<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: src/core/CL/cl_kernels/color_convert.cl File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">18.05</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
      <li><a href="globals.xhtml"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('color__convert_8cl.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">color_convert.cl File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br />
</div>
<p><a href="color__convert_8cl_source.xhtml">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a2a21de930ca0898bed0a081f40cb4406"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a2a21de930ca0898bed0a081f40cb4406">RGB888_to_RGBA8888_bt709</a> (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_offset_first_element_in_bytes, __global uchar *output_ptr, uint output_stride_x, uint output_step_x, uint output_stride_y, uint output_step_y, uint output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a2a21de930ca0898bed0a081f40cb4406"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an RGB888 image to RGBX8888.  <a href="#a2a21de930ca0898bed0a081f40cb4406">More...</a><br /></td></tr>
<tr class="separator:a2a21de930ca0898bed0a081f40cb4406"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae424d47188a7fffd83a3a9d0c0e1ce6e"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#ae424d47188a7fffd83a3a9d0c0e1ce6e">RGBA8888_to_RGB888_bt709</a> (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_offset_first_element_in_bytes, __global uchar *output_ptr, uint output_stride_x, uint output_step_x, uint output_stride_y, uint output_step_y, uint output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:ae424d47188a7fffd83a3a9d0c0e1ce6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an RGB888 image to RGBX8888.  <a href="#ae424d47188a7fffd83a3a9d0c0e1ce6e">More...</a><br /></td></tr>
<tr class="separator:ae424d47188a7fffd83a3a9d0c0e1ce6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b20f3b21bfb3e5ef177eb946e3c905f"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a0b20f3b21bfb3e5ef177eb946e3c905f">UYVY422_to_RGB888_bt709</a> (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_offset_first_element_in_bytes, __global uchar *output_ptr, uint output_stride_x, uint output_step_x, uint output_stride_y, uint output_step_y, uint output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a0b20f3b21bfb3e5ef177eb946e3c905f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a UYVY422 image to RGB888 using BT709 color space.  <a href="#a0b20f3b21bfb3e5ef177eb946e3c905f">More...</a><br /></td></tr>
<tr class="separator:a0b20f3b21bfb3e5ef177eb946e3c905f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22e98db2ca5538961967bdbaa19754b3"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a22e98db2ca5538961967bdbaa19754b3">UYVY422_to_RGBA8888_bt709</a> (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_offset_first_element_in_bytes, __global uchar *output_ptr, uint output_stride_x, uint output_step_x, uint output_stride_y, uint output_step_y, uint output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a22e98db2ca5538961967bdbaa19754b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a UYVY422 image to RGBX8888 using BT709 color space.  <a href="#a22e98db2ca5538961967bdbaa19754b3">More...</a><br /></td></tr>
<tr class="separator:a22e98db2ca5538961967bdbaa19754b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a694c56c3d1dd37a2773e650ab8e410b2"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a694c56c3d1dd37a2773e650ab8e410b2">YUYV422_to_RGB888_bt709</a> (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_offset_first_element_in_bytes, __global uchar *output_ptr, uint output_stride_x, uint output_step_x, uint output_stride_y, uint output_step_y, uint output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a694c56c3d1dd37a2773e650ab8e410b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a YUYV422 image to RGB888 using BT709 color space.  <a href="#a694c56c3d1dd37a2773e650ab8e410b2">More...</a><br /></td></tr>
<tr class="separator:a694c56c3d1dd37a2773e650ab8e410b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0be9d15196e78ed50afdbfa93a11662"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#ab0be9d15196e78ed50afdbfa93a11662">YUYV422_to_RGBA8888_bt709</a> (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_offset_first_element_in_bytes, __global uchar *output_ptr, uint output_stride_x, uint output_step_x, uint output_stride_y, uint output_step_y, uint output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:ab0be9d15196e78ed50afdbfa93a11662"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a YUYV422 image to RGBX8888 using BT709 color space.  <a href="#ab0be9d15196e78ed50afdbfa93a11662">More...</a><br /></td></tr>
<tr class="separator:ab0be9d15196e78ed50afdbfa93a11662"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa07d313ff115012737d4b522efc6079f"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#aa07d313ff115012737d4b522efc6079f">RGB888_to_NV12_bt709</a> (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_offset_first_element_in_bytes, __global uchar *luma_ptr, uint luma_stride_x, uint luma_step_x, uint luma_stride_y, uint luma_step_y, uint luma_offset_first_element_in_bytes, __global uchar *uv_ptr, uint uv_stride_x, uint uv_step_x, uint uv_stride_y, uint uv_step_y, uint uv_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:aa07d313ff115012737d4b522efc6079f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a RGB image to NV12 using BT709 color space.  <a href="#aa07d313ff115012737d4b522efc6079f">More...</a><br /></td></tr>
<tr class="separator:aa07d313ff115012737d4b522efc6079f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02037a65e2f5ec0579b8ed8efc33ff18"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a02037a65e2f5ec0579b8ed8efc33ff18">NV12_to_RGB888_bt709</a> (__global uchar *luma_input_ptr, uint luma_input_stride_x, uint luma_input_step_x, uint luma_input_stride_y, uint luma_input_step_y, uint luma_input_offset_first_element_in_bytes, __global uchar *uv_input_ptr, uint uv_input_stride_x, uint uv_input_step_x, uint uv_input_stride_y, uint uv_input_step_y, uint uv_input_offset_first_element_in_bytes, __global uchar *rgb_output_ptr, uint rgb_output_stride_x, uint rgb_output_step_x, uint rgb_output_stride_y, uint rgb_output_step_y, uint rgb_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a02037a65e2f5ec0579b8ed8efc33ff18"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an NV12 image to RGB888.  <a href="#a02037a65e2f5ec0579b8ed8efc33ff18">More...</a><br /></td></tr>
<tr class="separator:a02037a65e2f5ec0579b8ed8efc33ff18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a917c100f2da4a0e773bb63dd4f87de0b"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a917c100f2da4a0e773bb63dd4f87de0b">RGB888_to_YUV444_bt709</a> (__global uchar *rgb_input_ptr, uint rgb_input_stride_x, uint rgb_input_step_x, uint rgb_input_stride_y, uint rgb_input_step_y, uint rgb_input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *u_output_ptr, uint u_output_stride_x, uint u_output_step_x, uint u_output_stride_y, uint u_output_step_y, uint u_output_offset_first_element_in_bytes, __global uchar *v_output_ptr, uint v_output_stride_x, uint v_output_step_x, uint v_output_stride_y, uint v_output_step_y, uint v_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a917c100f2da4a0e773bb63dd4f87de0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a RGB image to YUV444 using BT709 color space.  <a href="#a917c100f2da4a0e773bb63dd4f87de0b">More...</a><br /></td></tr>
<tr class="separator:a917c100f2da4a0e773bb63dd4f87de0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e87467985f2b64c5aaf073ee5c64267"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a0e87467985f2b64c5aaf073ee5c64267">RGB888_to_IYUV_bt709</a> (__global uchar *rgb_input_ptr, uint rgb_input_stride_x, uint rgb_input_step_x, uint rgb_input_stride_y, uint rgb_input_step_y, uint rgb_input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *u_output_ptr, uint u_output_stride_x, uint u_output_step_x, uint u_output_stride_y, uint u_output_step_y, uint u_output_offset_first_element_in_bytes, __global uchar *v_output_ptr, uint v_output_stride_x, uint v_output_step_x, uint v_output_stride_y, uint v_output_step_y, uint v_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a0e87467985f2b64c5aaf073ee5c64267"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a RGB image to IYUV using BT709 color space.  <a href="#a0e87467985f2b64c5aaf073ee5c64267">More...</a><br /></td></tr>
<tr class="separator:a0e87467985f2b64c5aaf073ee5c64267"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee9a7e06c86387d2a46aad341fa940d0"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#aee9a7e06c86387d2a46aad341fa940d0">RGBA8888_to_YUV444_bt709</a> (__global uchar *rgba_input_ptr, uint rgba_input_stride_x, uint rgba_input_step_x, uint rgba_input_stride_y, uint rgba_input_step_y, uint rgba_input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *u_output_ptr, uint u_output_stride_x, uint u_output_step_x, uint u_output_stride_y, uint u_output_step_y, uint u_output_offset_first_element_in_bytes, __global uchar *v_output_ptr, uint v_output_stride_x, uint v_output_step_x, uint v_output_stride_y, uint v_output_step_y, uint v_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:aee9a7e06c86387d2a46aad341fa940d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a RGBA image to YUV444 using BT709 color space.  <a href="#aee9a7e06c86387d2a46aad341fa940d0">More...</a><br /></td></tr>
<tr class="separator:aee9a7e06c86387d2a46aad341fa940d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ef9b466943c743b2a0f2865a70f741a"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a9ef9b466943c743b2a0f2865a70f741a">RGBA8888_to_NV12_bt709</a> (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *uv_output_ptr, uint uv_output_stride_x, uint uv_output_step_x, uint uv_output_stride_y, uint uv_output_step_y, uint uv_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a9ef9b466943c743b2a0f2865a70f741a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a RGBA image to NV12 using BT709 color space.  <a href="#a9ef9b466943c743b2a0f2865a70f741a">More...</a><br /></td></tr>
<tr class="separator:a9ef9b466943c743b2a0f2865a70f741a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18ef3b2b70de9af3e4386b2a07f2cd36"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a18ef3b2b70de9af3e4386b2a07f2cd36">RGBA8888_to_IYUV_bt709</a> (__global uchar *rgba_input_ptr, uint rgba_input_stride_x, uint rgba_input_step_x, uint rgba_input_stride_y, uint rgba_input_step_y, uint rgba_input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *u_output_ptr, uint u_output_stride_x, uint u_output_step_x, uint u_output_stride_y, uint u_output_step_y, uint u_output_offset_first_element_in_bytes, __global uchar *v_output_ptr, uint v_output_stride_x, uint v_output_step_x, uint v_output_stride_y, uint v_output_step_y, uint v_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a18ef3b2b70de9af3e4386b2a07f2cd36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a RGBA image to IYUV using BT709 color space.  <a href="#a18ef3b2b70de9af3e4386b2a07f2cd36">More...</a><br /></td></tr>
<tr class="separator:a18ef3b2b70de9af3e4386b2a07f2cd36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84880a0b48a6d4ff812b07ef7dcf0eda"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a84880a0b48a6d4ff812b07ef7dcf0eda">NV12_to_RGBA8888_bt709</a> (__global uchar *luma_input_ptr, uint luma_input_stride_x, uint luma_input_step_x, uint luma_input_stride_y, uint luma_input_step_y, uint luma_input_offset_first_element_in_bytes, __global uchar *uv_input_ptr, uint uv_input_stride_x, uint uv_input_step_x, uint uv_input_stride_y, uint uv_input_step_y, uint uv_input_offset_first_element_in_bytes, __global uchar *rgb_output_ptr, uint rgb_output_stride_x, uint rgb_output_step_x, uint rgb_output_stride_y, uint rgb_output_step_y, uint rgb_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a84880a0b48a6d4ff812b07ef7dcf0eda"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an NV12 image to RGB8888.  <a href="#a84880a0b48a6d4ff812b07ef7dcf0eda">More...</a><br /></td></tr>
<tr class="separator:a84880a0b48a6d4ff812b07ef7dcf0eda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fb5e7276f3da6febe4e9c48fe085169"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a8fb5e7276f3da6febe4e9c48fe085169">NV12_to_IYUV_bt709</a> (__global uchar *luma_input_ptr, uint luma_input_stride_x, uint luma_input_step_x, uint luma_input_stride_y, uint luma_input_step_y, uint luma_input_offset_first_element_in_bytes, __global uchar *uv_input_ptr, uint uv_input_stride_x, uint uv_input_step_x, uint uv_input_stride_y, uint uv_input_step_y, uint uv_input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *u_output_ptr, uint u_output_stride_x, uint u_output_step_x, uint u_output_stride_y, uint u_output_step_y, uint u_output_offset_first_element_in_bytes, __global uchar *v_output_ptr, uint v_output_stride_x, uint v_output_step_x, uint v_output_stride_y, uint v_output_step_y, uint v_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a8fb5e7276f3da6febe4e9c48fe085169"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an NV12 image to IYUV.  <a href="#a8fb5e7276f3da6febe4e9c48fe085169">More...</a><br /></td></tr>
<tr class="separator:a8fb5e7276f3da6febe4e9c48fe085169"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c05435371a2cb1b2782d0a434407150"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a2c05435371a2cb1b2782d0a434407150">NV12_to_YUV444_bt709</a> (__global uchar *luma_input_ptr, uint luma_input_stride_x, uint luma_input_step_x, uint luma_input_stride_y, uint luma_input_step_y, uint luma_input_offset_first_element_in_bytes, __global uchar *uv_input_ptr, uint uv_input_stride_x, uint uv_input_step_x, uint uv_input_stride_y, uint uv_input_step_y, uint uv_input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *u_output_ptr, uint u_output_stride_x, uint u_output_step_x, uint u_output_stride_y, uint u_output_step_y, uint u_output_offset_first_element_in_bytes, __global uchar *v_output_ptr, uint v_output_stride_x, uint v_output_step_x, uint v_output_stride_y, uint v_output_step_y, uint v_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a2c05435371a2cb1b2782d0a434407150"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an NV12 image to YUV444.  <a href="#a2c05435371a2cb1b2782d0a434407150">More...</a><br /></td></tr>
<tr class="separator:a2c05435371a2cb1b2782d0a434407150"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57f0e4cc61a99718caaaaab82d393009"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a57f0e4cc61a99718caaaaab82d393009">NV21_to_RGB888_bt709</a> (__global uchar *luma_input_ptr, uint luma_input_stride_x, uint luma_input_step_x, uint luma_input_stride_y, uint luma_input_step_y, uint luma_input_offset_first_element_in_bytes, __global uchar *uv_input_ptr, uint uv_input_stride_x, uint uv_input_step_x, uint uv_input_stride_y, uint uv_input_step_y, uint uv_input_offset_first_element_in_bytes, __global uchar *rgb_output_ptr, uint rgb_output_stride_x, uint rgb_output_step_x, uint rgb_output_stride_y, uint rgb_output_step_y, uint rgb_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a57f0e4cc61a99718caaaaab82d393009"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an NV21 image to RGB888.  <a href="#a57f0e4cc61a99718caaaaab82d393009">More...</a><br /></td></tr>
<tr class="separator:a57f0e4cc61a99718caaaaab82d393009"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad96db99a88669713407e91c036b06df2"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#ad96db99a88669713407e91c036b06df2">NV21_to_RGBA8888_bt709</a> (__global uchar *luma_input_ptr, uint luma_input_stride_x, uint luma_input_step_x, uint luma_input_stride_y, uint luma_input_step_y, uint luma_input_offset_first_element_in_bytes, __global uchar *uv_input_ptr, uint uv_input_stride_x, uint uv_input_step_x, uint uv_input_stride_y, uint uv_input_step_y, uint uv_input_offset_first_element_in_bytes, __global uchar *rgba_output_ptr, uint rgba_output_stride_x, uint rgba_output_step_x, uint rgba_output_stride_y, uint rgba_output_step_y, uint rgba_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:ad96db99a88669713407e91c036b06df2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an NV12 image to RGB8888.  <a href="#ad96db99a88669713407e91c036b06df2">More...</a><br /></td></tr>
<tr class="separator:ad96db99a88669713407e91c036b06df2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd3f622e7d731ae70306266b334ff33b"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#abd3f622e7d731ae70306266b334ff33b">NV21_to_YUV444_bt709</a> (__global uchar *luma_input_ptr, uint luma_input_stride_x, uint luma_input_step_x, uint luma_input_stride_y, uint luma_input_step_y, uint luma_input_offset_first_element_in_bytes, __global uchar *uv_input_ptr, uint uv_input_stride_x, uint uv_input_step_x, uint uv_input_stride_y, uint uv_input_step_y, uint uv_input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *u_output_ptr, uint u_output_stride_x, uint u_output_step_x, uint u_output_stride_y, uint u_output_step_y, uint u_output_offset_first_element_in_bytes, __global uchar *v_output_ptr, uint v_output_stride_x, uint v_output_step_x, uint v_output_stride_y, uint v_output_step_y, uint v_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:abd3f622e7d731ae70306266b334ff33b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an NV21 image to YUV444.  <a href="#abd3f622e7d731ae70306266b334ff33b">More...</a><br /></td></tr>
<tr class="separator:abd3f622e7d731ae70306266b334ff33b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfdf02c3ab4893afc7e05afc3a950555"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#acfdf02c3ab4893afc7e05afc3a950555">NV21_to_IYUV_bt709</a> (__global uchar *luma_input_ptr, uint luma_input_stride_x, uint luma_input_step_x, uint luma_input_stride_y, uint luma_input_step_y, uint luma_input_offset_first_element_in_bytes, __global uchar *uv_input_ptr, uint uv_input_stride_x, uint uv_input_step_x, uint uv_input_stride_y, uint uv_input_step_y, uint uv_input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *u_output_ptr, uint u_output_stride_x, uint u_output_step_x, uint u_output_stride_y, uint u_output_step_y, uint u_output_offset_first_element_in_bytes, __global uchar *v_output_ptr, uint v_output_stride_x, uint v_output_step_x, uint v_output_stride_y, uint v_output_step_y, uint v_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:acfdf02c3ab4893afc7e05afc3a950555"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an NV21 image to IYUV.  <a href="#acfdf02c3ab4893afc7e05afc3a950555">More...</a><br /></td></tr>
<tr class="separator:acfdf02c3ab4893afc7e05afc3a950555"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8946fa606d523038e103e6b4ceb42e56"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a8946fa606d523038e103e6b4ceb42e56">UYVY422_to_IYUV_bt709</a> (__global uchar *uyvy_input_ptr, uint uyvy_input_stride_x, uint uyvy_input_step_x, uint uyvy_input_stride_y, uint uyvy_input_step_y, uint uyvy_input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *u_output_ptr, uint u_output_stride_x, uint u_output_step_x, uint u_output_stride_y, uint u_output_step_y, uint u_output_offset_first_element_in_bytes, __global uchar *v_output_ptr, uint v_output_stride_x, uint v_output_step_x, uint v_output_stride_y, uint v_output_step_y, uint v_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a8946fa606d523038e103e6b4ceb42e56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a UYVY image to IYUV using BT709 color space.  <a href="#a8946fa606d523038e103e6b4ceb42e56">More...</a><br /></td></tr>
<tr class="separator:a8946fa606d523038e103e6b4ceb42e56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f241a3b4a3fbd337c6fe03cd4e61877"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a3f241a3b4a3fbd337c6fe03cd4e61877">YUYV422_to_IYUV_bt709</a> (__global uchar *yuyv_input_ptr, uint yuyv_input_stride_x, uint yuyv_input_step_x, uint yuyv_input_stride_y, uint yuyv_input_step_y, uint yuyv_input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *u_output_ptr, uint u_output_stride_x, uint u_output_step_x, uint u_output_stride_y, uint u_output_step_y, uint u_output_offset_first_element_in_bytes, __global uchar *v_output_ptr, uint v_output_stride_x, uint v_output_step_x, uint v_output_stride_y, uint v_output_step_y, uint v_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a3f241a3b4a3fbd337c6fe03cd4e61877"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a YUYV image to IYUV using BT709 color space.  <a href="#a3f241a3b4a3fbd337c6fe03cd4e61877">More...</a><br /></td></tr>
<tr class="separator:a3f241a3b4a3fbd337c6fe03cd4e61877"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40d2fa0803ea5b0e979dc124a2606564"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a40d2fa0803ea5b0e979dc124a2606564">IYUV_to_RGB888_bt709</a> (__global uchar *luma_input_ptr, uint luma_input_stride_x, uint luma_input_step_x, uint luma_input_stride_y, uint luma_input_step_y, uint luma_input_offset_first_element_in_bytes, __global uchar *u_input_ptr, uint u_input_stride_x, uint u_input_step_x, uint u_input_stride_y, uint u_input_step_y, uint u_input_offset_first_element_in_bytes, __global uchar *v_input_ptr, uint v_input_stride_x, uint v_input_step_x, uint v_input_stride_y, uint v_input_step_y, uint v_input_offset_first_element_in_bytes, __global uchar *rgb_output_ptr, uint rgb_output_stride_x, uint rgb_output_step_x, uint rgb_output_stride_y, uint rgb_output_step_y, uint rgb_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a40d2fa0803ea5b0e979dc124a2606564"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an IYUV image to RGB888.  <a href="#a40d2fa0803ea5b0e979dc124a2606564">More...</a><br /></td></tr>
<tr class="separator:a40d2fa0803ea5b0e979dc124a2606564"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a8a4562d5b32de4a1d1352712d9c782"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a7a8a4562d5b32de4a1d1352712d9c782">IYUV_to_RGBA8888_bt709</a> (__global uchar *luma_input_ptr, uint luma_input_stride_x, uint luma_input_step_x, uint luma_input_stride_y, uint luma_input_step_y, uint luma_input_offset_first_element_in_bytes, __global uchar *u_input_ptr, uint u_input_stride_x, uint u_input_step_x, uint u_input_stride_y, uint u_input_step_y, uint u_input_offset_first_element_in_bytes, __global uchar *v_input_ptr, uint v_input_stride_x, uint v_input_step_x, uint v_input_stride_y, uint v_input_step_y, uint v_input_offset_first_element_in_bytes, __global uchar *rgba_output_ptr, uint rgba_output_stride_x, uint rgba_output_step_x, uint rgba_output_stride_y, uint rgba_output_step_y, uint rgba_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a7a8a4562d5b32de4a1d1352712d9c782"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an IYUV image to RGB8888.  <a href="#a7a8a4562d5b32de4a1d1352712d9c782">More...</a><br /></td></tr>
<tr class="separator:a7a8a4562d5b32de4a1d1352712d9c782"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a718147fe7bf9f1bce18e07c2cfcc472c"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a718147fe7bf9f1bce18e07c2cfcc472c">IYUV_to_YUV444_bt709</a> (__global uchar *luma_input_ptr, uint luma_input_stride_x, uint luma_input_step_x, uint luma_input_stride_y, uint luma_input_step_y, uint luma_input_offset_first_element_in_bytes, __global uchar *u_input_ptr, uint u_input_stride_x, uint u_input_step_x, uint u_input_stride_y, uint u_input_step_y, uint u_input_offset_first_element_in_bytes, __global uchar *v_input_ptr, uint v_input_stride_x, uint v_input_step_x, uint v_input_stride_y, uint v_input_step_y, uint v_input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *u_output_ptr, uint u_output_stride_x, uint u_output_step_x, uint u_output_stride_y, uint u_output_step_y, uint u_output_offset_first_element_in_bytes, __global uchar *v_output_ptr, uint v_output_stride_x, uint v_output_step_x, uint v_output_stride_y, uint v_output_step_y, uint v_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a718147fe7bf9f1bce18e07c2cfcc472c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an IYUV image to YUV444.  <a href="#a718147fe7bf9f1bce18e07c2cfcc472c">More...</a><br /></td></tr>
<tr class="separator:a718147fe7bf9f1bce18e07c2cfcc472c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47fa13a636a45eaa621bdbcbb206895f"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a47fa13a636a45eaa621bdbcbb206895f">IYUV_to_NV12_bt709</a> (__global uchar *luma_input_ptr, uint luma_input_stride_x, uint luma_input_step_x, uint luma_input_stride_y, uint luma_input_step_y, uint luma_input_offset_first_element_in_bytes, __global uchar *u_input_ptr, uint u_input_stride_x, uint u_input_step_x, uint u_input_stride_y, uint u_input_step_y, uint u_input_offset_first_element_in_bytes, __global uchar *v_input_ptr, uint v_input_stride_x, uint v_input_step_x, uint v_input_stride_y, uint v_input_step_y, uint v_input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *uv_output_ptr, uint uv_output_stride_x, uint uv_output_step_x, uint uv_output_stride_y, uint uv_output_step_y, uint uv_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a47fa13a636a45eaa621bdbcbb206895f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an IYUV image to NV12.  <a href="#a47fa13a636a45eaa621bdbcbb206895f">More...</a><br /></td></tr>
<tr class="separator:a47fa13a636a45eaa621bdbcbb206895f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4d458afddfb19f170cb27a9cc934069"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#aa4d458afddfb19f170cb27a9cc934069">YUYV422_to_NV12_bt709</a> (__global uchar *yuyv_input_ptr, uint yuyv_input_stride_x, uint yuyv_input_step_x, uint yuyv_input_stride_y, uint yuyv_input_step_y, uint yuyv_input_offset_first_element_in_bytes, __global uchar *luma_output_ptr, uint luma_output_stride_x, uint luma_output_step_x, uint luma_output_stride_y, uint luma_output_step_y, uint luma_output_offset_first_element_in_bytes, __global uchar *uv_output_ptr, uint uv_output_stride_x, uint uv_output_step_x, uint uv_output_stride_y, uint uv_output_step_y, uint uv_output_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:aa4d458afddfb19f170cb27a9cc934069"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a YUYV image to NV12 using BT709 color space.  <a href="#aa4d458afddfb19f170cb27a9cc934069">More...</a><br /></td></tr>
<tr class="separator:aa4d458afddfb19f170cb27a9cc934069"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a966fe2be85946bbbe2ecad5ad1100d1f"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="color__convert_8cl.xhtml#a966fe2be85946bbbe2ecad5ad1100d1f">UYVY422_to_NV12_bt709</a> (__global uchar *input_uyvy_ptr, uint input_uyvy_stride_x, uint input_uyvy_step_x, uint input_uyvy_stride_y, uint input_uyvy_step_y, uint input_uyvy_offset_first_element_in_bytes, __global uchar *luma_ptr, uint luma_stride_x, uint luma_step_x, uint luma_stride_y, uint luma_step_y, uint luma_offset_first_element_in_bytes, __global uchar *uv_ptr, uint uv_stride_x, uint uv_step_x, uint uv_stride_y, uint uv_step_y, uint uv_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a966fe2be85946bbbe2ecad5ad1100d1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a UYVY image to NV12 using BT709 color space.  <a href="#a966fe2be85946bbbe2ecad5ad1100d1f">More...</a><br /></td></tr>
<tr class="separator:a966fe2be85946bbbe2ecad5ad1100d1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a47fa13a636a45eaa621bdbcbb206895f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void IYUV_to_NV12_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uv_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an IYUV image to NV12. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 16), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_ptr</td><td>Pointer to the source luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_x</td><td>Stride of the luma image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_x</td><td>luma_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_y</td><td>Stride of the source luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_y</td><td>luma_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_ptr</td><td>Pointer to the source U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_stride_x</td><td>Stride of the source image U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_step_x</td><td>u_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_step_y</td><td>u_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source U channel </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_ptr</td><td>Pointer to the source V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_stride_x</td><td>Stride of the source image V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_step_x</td><td>v_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_stride_y</td><td>Stride of the source image V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_step_y</td><td>v_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image V channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">uv_output_ptr</td><td>Pointer to the destination UV channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_stride_x</td><td>Stride of the destination UV channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_step_x</td><td>uv_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_stride_y</td><td>Stride of the destination image U channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_step_y</td><td>uv_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination UV channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l01703">1703</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l01709"></a><span class="lineno"> 1709</span>&#160;{</div><div class="line"><a name="l01710"></a><span class="lineno"> 1710</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_y   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_input);</div><div class="line"><a name="l01711"></a><span class="lineno"> 1711</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_u   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_input);</div><div class="line"><a name="l01712"></a><span class="lineno"> 1712</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_v   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_input);</div><div class="line"><a name="l01713"></a><span class="lineno"> 1713</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l01714"></a><span class="lineno"> 1714</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_uv = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uv_output);</div><div class="line"><a name="l01715"></a><span class="lineno"> 1715</span>&#160;</div><div class="line"><a name="l01716"></a><span class="lineno"> 1716</span>&#160;    <span class="comment">// handle 32 pixels every time, two lines, each line for 16 pixels</span></div><div class="line"><a name="l01717"></a><span class="lineno"> 1717</span>&#160;    uchar16 luma_0 = vload16(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01718"></a><span class="lineno"> 1718</span>&#160;    uchar16 luma_1 = vload16(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_input_stride_y);</div><div class="line"><a name="l01719"></a><span class="lineno"> 1719</span>&#160;    uchar8  cb     = vload8(0, in_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01720"></a><span class="lineno"> 1720</span>&#160;    uchar8  cr     = vload8(0, in_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01721"></a><span class="lineno"> 1721</span>&#160;    uchar16 cbcr   = (uchar16)(cb.s0, cr.s0, cb.s1, cr.s1, cb.s2, cr.s2, cb.s3, cr.s3, cb.s4, cr.s4, cb.s5, cr.s5, cb.s6,</div><div class="line"><a name="l01722"></a><span class="lineno"> 1722</span>&#160;                               cr.s6, cb.s7, cr.s7);</div><div class="line"><a name="l01723"></a><span class="lineno"> 1723</span>&#160;</div><div class="line"><a name="l01724"></a><span class="lineno"> 1724</span>&#160;    vstore16(luma_0, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01725"></a><span class="lineno"> 1725</span>&#160;    vstore16(luma_1, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_output_stride_y);</div><div class="line"><a name="l01726"></a><span class="lineno"> 1726</span>&#160;    vstore16(cbcr, 0, out_uv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01727"></a><span class="lineno"> 1727</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a40d2fa0803ea5b0e979dc124a2606564"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void IYUV_to_RGB888_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>rgb_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an IYUV image to RGB888. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 4), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_ptr</td><td>Pointer to the source luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_x</td><td>Stride of the luma image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_x</td><td>luma_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_y</td><td>Stride of the source luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_y</td><td>luma_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_ptr</td><td>Pointer to the source U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_stride_x</td><td>Stride of the source image U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_step_x</td><td>u_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_step_y</td><td>u_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source U channel </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_ptr</td><td>Pointer to the source V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_stride_x</td><td>Stride of the source image V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_step_x</td><td>v_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_stride_y</td><td>Stride of the source image V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_step_y</td><td>v_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image V channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">rgb_output_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_step_x</td><td>rgb_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_step_y</td><td>rgb_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l01462">1462</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l01467"></a><span class="lineno"> 1467</span>&#160;{</div><div class="line"><a name="l01468"></a><span class="lineno"> 1468</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_y    = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_input);</div><div class="line"><a name="l01469"></a><span class="lineno"> 1469</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_u    = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_input);</div><div class="line"><a name="l01470"></a><span class="lineno"> 1470</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_v    = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_input);</div><div class="line"><a name="l01471"></a><span class="lineno"> 1471</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_rgb = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(rgb_output);</div><div class="line"><a name="l01472"></a><span class="lineno"> 1472</span>&#160;</div><div class="line"><a name="l01473"></a><span class="lineno"> 1473</span>&#160;    <span class="comment">// handle 8 pixels every time, two lines, each line for 4 pixels</span></div><div class="line"><a name="l01474"></a><span class="lineno"> 1474</span>&#160;    uchar4 luma_0 = vload4(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01475"></a><span class="lineno"> 1475</span>&#160;    uchar4 luma_1 = vload4(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_input_stride_y);</div><div class="line"><a name="l01476"></a><span class="lineno"> 1476</span>&#160;    uchar4 cbcr   = (uchar4)(vload2(0, in_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>), vload2(0, in_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>));</div><div class="line"><a name="l01477"></a><span class="lineno"> 1477</span>&#160;    char4  cb     = (char4)(cbcr.s0, cbcr.s0, cbcr.s1, cbcr.s1) - (char4)(128);</div><div class="line"><a name="l01478"></a><span class="lineno"> 1478</span>&#160;    char4  cr     = (char4)(cbcr.s2, cbcr.s2, cbcr.s3, cbcr.s3) - (char4)(128);</div><div class="line"><a name="l01479"></a><span class="lineno"> 1479</span>&#160;</div><div class="line"><a name="l01480"></a><span class="lineno"> 1480</span>&#160;    float4 temp0 = (float4)(0.0000f) + (float4)(0.0000f) * convert_float4(cb) + (float4)(1.5748f) * convert_float4(cr);</div><div class="line"><a name="l01481"></a><span class="lineno"> 1481</span>&#160;    float4 temp1 = (float4)(0.0000f) - (float4)(0.1873f) * convert_float4(cb) - (float4)(0.4681f) * convert_float4(cr);</div><div class="line"><a name="l01482"></a><span class="lineno"> 1482</span>&#160;    float4 temp2 = (float4)(0.0000f) + (float4)(1.8556f) * convert_float4(cb) + (float4)(0.0000f) * convert_float4(cr);</div><div class="line"><a name="l01483"></a><span class="lineno"> 1483</span>&#160;</div><div class="line"><a name="l01484"></a><span class="lineno"> 1484</span>&#160;    float4 f_r = convert_float4(luma_0) + temp0;</div><div class="line"><a name="l01485"></a><span class="lineno"> 1485</span>&#160;    float4 f_g = convert_float4(luma_0) + temp1;</div><div class="line"><a name="l01486"></a><span class="lineno"> 1486</span>&#160;    float4 f_b = convert_float4(luma_0) + temp2;</div><div class="line"><a name="l01487"></a><span class="lineno"> 1487</span>&#160;</div><div class="line"><a name="l01488"></a><span class="lineno"> 1488</span>&#160;    uchar4 r_0 = convert_uchar4_rtz(f_r);</div><div class="line"><a name="l01489"></a><span class="lineno"> 1489</span>&#160;    uchar4 g_0 = convert_uchar4_rtz(f_g);</div><div class="line"><a name="l01490"></a><span class="lineno"> 1490</span>&#160;    uchar4 b_0 = convert_uchar4_rtz(f_b);</div><div class="line"><a name="l01491"></a><span class="lineno"> 1491</span>&#160;</div><div class="line"><a name="l01492"></a><span class="lineno"> 1492</span>&#160;    uchar8 rgb_0 = (uchar8)(r_0.s0, g_0.s0, b_0.s0, r_0.s1, g_0.s1, b_0.s1, r_0.s2, g_0.s2);</div><div class="line"><a name="l01493"></a><span class="lineno"> 1493</span>&#160;    uchar4 rgb_1 = (uchar4)(b_0.s2, r_0.s3, g_0.s3, b_0.s3);</div><div class="line"><a name="l01494"></a><span class="lineno"> 1494</span>&#160;    vstore8(rgb_0, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01495"></a><span class="lineno"> 1495</span>&#160;    vstore4(rgb_1, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 8);</div><div class="line"><a name="l01496"></a><span class="lineno"> 1496</span>&#160;</div><div class="line"><a name="l01497"></a><span class="lineno"> 1497</span>&#160;    f_r = convert_float4(luma_1) + temp0;</div><div class="line"><a name="l01498"></a><span class="lineno"> 1498</span>&#160;    f_g = convert_float4(luma_1) + temp1;</div><div class="line"><a name="l01499"></a><span class="lineno"> 1499</span>&#160;    f_b = convert_float4(luma_1) + temp2;</div><div class="line"><a name="l01500"></a><span class="lineno"> 1500</span>&#160;</div><div class="line"><a name="l01501"></a><span class="lineno"> 1501</span>&#160;    r_0 = convert_uchar4_rtz(f_r);</div><div class="line"><a name="l01502"></a><span class="lineno"> 1502</span>&#160;    g_0 = convert_uchar4_rtz(f_g);</div><div class="line"><a name="l01503"></a><span class="lineno"> 1503</span>&#160;    b_0 = convert_uchar4_rtz(f_b);</div><div class="line"><a name="l01504"></a><span class="lineno"> 1504</span>&#160;</div><div class="line"><a name="l01505"></a><span class="lineno"> 1505</span>&#160;    rgb_0 = (uchar8)(r_0.s0, g_0.s0, b_0.s0, r_0.s1, g_0.s1, b_0.s1, r_0.s2, g_0.s2);</div><div class="line"><a name="l01506"></a><span class="lineno"> 1506</span>&#160;    rgb_1 = (uchar4)(b_0.s2, r_0.s3, g_0.s3, b_0.s3);</div><div class="line"><a name="l01507"></a><span class="lineno"> 1507</span>&#160;    vstore8(rgb_0, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgb_output_stride_y);</div><div class="line"><a name="l01508"></a><span class="lineno"> 1508</span>&#160;    vstore4(rgb_1, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgb_output_stride_y + 8);</div><div class="line"><a name="l01509"></a><span class="lineno"> 1509</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a7a8a4562d5b32de4a1d1352712d9c782"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void IYUV_to_RGBA8888_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>rgba_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an IYUV image to RGB8888. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 4), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_ptr</td><td>Pointer to the source luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_x</td><td>Stride of the luma image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_x</td><td>luma_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_y</td><td>Stride of the source luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_y</td><td>luma_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_ptr</td><td>Pointer to the source U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_stride_x</td><td>Stride of the source image U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_step_x</td><td>u_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_step_y</td><td>u_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source U channel </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_ptr</td><td>Pointer to the source V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_stride_x</td><td>Stride of the source image V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_step_x</td><td>v_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_stride_y</td><td>Stride of the source image V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_step_y</td><td>v_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image V channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">rgba_output_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_output_step_x</td><td>rgba_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_output_step_y</td><td>rgba_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l01541">1541</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l01546"></a><span class="lineno"> 1546</span>&#160;{</div><div class="line"><a name="l01547"></a><span class="lineno"> 1547</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_y    = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_input);</div><div class="line"><a name="l01548"></a><span class="lineno"> 1548</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_u    = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_input);</div><div class="line"><a name="l01549"></a><span class="lineno"> 1549</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_v    = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_input);</div><div class="line"><a name="l01550"></a><span class="lineno"> 1550</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_rgb = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(rgba_output);</div><div class="line"><a name="l01551"></a><span class="lineno"> 1551</span>&#160;</div><div class="line"><a name="l01552"></a><span class="lineno"> 1552</span>&#160;    <span class="comment">// handle 8 pixels every time, two lines, each line for 4 pixels</span></div><div class="line"><a name="l01553"></a><span class="lineno"> 1553</span>&#160;    uchar4 luma_0 = vload4(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01554"></a><span class="lineno"> 1554</span>&#160;    uchar4 luma_1 = vload4(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_input_stride_y);</div><div class="line"><a name="l01555"></a><span class="lineno"> 1555</span>&#160;    uchar4 cbcr   = (uchar4)(vload2(0, in_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>), vload2(0, in_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>));</div><div class="line"><a name="l01556"></a><span class="lineno"> 1556</span>&#160;    char4  cb     = (char4)(cbcr.s0, cbcr.s0, cbcr.s1, cbcr.s1) - (char4)(128);</div><div class="line"><a name="l01557"></a><span class="lineno"> 1557</span>&#160;    char4  cr     = (char4)(cbcr.s2, cbcr.s2, cbcr.s3, cbcr.s3) - (char4)(128);</div><div class="line"><a name="l01558"></a><span class="lineno"> 1558</span>&#160;</div><div class="line"><a name="l01559"></a><span class="lineno"> 1559</span>&#160;    float4 temp0 = (float4)(0.0000f) + (float4)(0.0000f) * convert_float4(cb) + (float4)(1.5748f) * convert_float4(cr);</div><div class="line"><a name="l01560"></a><span class="lineno"> 1560</span>&#160;    float4 temp1 = (float4)(0.0000f) - (float4)(0.1873f) * convert_float4(cb) - (float4)(0.4681f) * convert_float4(cr);</div><div class="line"><a name="l01561"></a><span class="lineno"> 1561</span>&#160;    float4 temp2 = (float4)(0.0000f) + (float4)(1.8556f) * convert_float4(cb) + (float4)(0.0000f) * convert_float4(cr);</div><div class="line"><a name="l01562"></a><span class="lineno"> 1562</span>&#160;</div><div class="line"><a name="l01563"></a><span class="lineno"> 1563</span>&#160;    float4 f_r = convert_float4(luma_0) + temp0;</div><div class="line"><a name="l01564"></a><span class="lineno"> 1564</span>&#160;    float4 f_g = convert_float4(luma_0) + temp1;</div><div class="line"><a name="l01565"></a><span class="lineno"> 1565</span>&#160;    float4 f_b = convert_float4(luma_0) + temp2;</div><div class="line"><a name="l01566"></a><span class="lineno"> 1566</span>&#160;</div><div class="line"><a name="l01567"></a><span class="lineno"> 1567</span>&#160;    uchar4 r_0 = convert_uchar4_rtz(f_r);</div><div class="line"><a name="l01568"></a><span class="lineno"> 1568</span>&#160;    uchar4 g_0 = convert_uchar4_rtz(f_g);</div><div class="line"><a name="l01569"></a><span class="lineno"> 1569</span>&#160;    uchar4 b_0 = convert_uchar4_rtz(f_b);</div><div class="line"><a name="l01570"></a><span class="lineno"> 1570</span>&#160;</div><div class="line"><a name="l01571"></a><span class="lineno"> 1571</span>&#160;    uchar8 rgb_0 = (uchar8)(r_0.s0, g_0.s0, b_0.s0, 255, r_0.s1, g_0.s1, b_0.s1, 255);</div><div class="line"><a name="l01572"></a><span class="lineno"> 1572</span>&#160;    uchar8 rgb_1 = (uchar8)(r_0.s2, g_0.s2, b_0.s2, 255, r_0.s3, g_0.s3, b_0.s3, 255);</div><div class="line"><a name="l01573"></a><span class="lineno"> 1573</span>&#160;    vstore8(rgb_0, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01574"></a><span class="lineno"> 1574</span>&#160;    vstore8(rgb_1, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 8);</div><div class="line"><a name="l01575"></a><span class="lineno"> 1575</span>&#160;</div><div class="line"><a name="l01576"></a><span class="lineno"> 1576</span>&#160;    f_r = convert_float4(luma_1) + temp0;</div><div class="line"><a name="l01577"></a><span class="lineno"> 1577</span>&#160;    f_g = convert_float4(luma_1) + temp1;</div><div class="line"><a name="l01578"></a><span class="lineno"> 1578</span>&#160;    f_b = convert_float4(luma_1) + temp2;</div><div class="line"><a name="l01579"></a><span class="lineno"> 1579</span>&#160;</div><div class="line"><a name="l01580"></a><span class="lineno"> 1580</span>&#160;    r_0 = convert_uchar4_rtz(f_r);</div><div class="line"><a name="l01581"></a><span class="lineno"> 1581</span>&#160;    g_0 = convert_uchar4_rtz(f_g);</div><div class="line"><a name="l01582"></a><span class="lineno"> 1582</span>&#160;    b_0 = convert_uchar4_rtz(f_b);</div><div class="line"><a name="l01583"></a><span class="lineno"> 1583</span>&#160;</div><div class="line"><a name="l01584"></a><span class="lineno"> 1584</span>&#160;    rgb_0 = (uchar8)(r_0.s0, g_0.s0, b_0.s0, 255, r_0.s1, g_0.s1, b_0.s1, 255);</div><div class="line"><a name="l01585"></a><span class="lineno"> 1585</span>&#160;    rgb_1 = (uchar8)(r_0.s2, g_0.s2, b_0.s2, 255, r_0.s3, g_0.s3, b_0.s3, 255);</div><div class="line"><a name="l01586"></a><span class="lineno"> 1586</span>&#160;    vstore8(rgb_0, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgba_output_stride_y);</div><div class="line"><a name="l01587"></a><span class="lineno"> 1587</span>&#160;    vstore8(rgb_1, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgba_output_stride_y + 8);</div><div class="line"><a name="l01588"></a><span class="lineno"> 1588</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a718147fe7bf9f1bce18e07c2cfcc472c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void IYUV_to_YUV444_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an IYUV image to YUV444. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 16), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_ptr</td><td>Pointer to the source luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_x</td><td>Stride of the luma image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_x</td><td>luma_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_y</td><td>Stride of the source luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_y</td><td>luma_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_ptr</td><td>Pointer to the source U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_stride_x</td><td>Stride of the source image U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_step_x</td><td>u_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_step_y</td><td>u_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source U channel </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_ptr</td><td>Pointer to the source V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_stride_x</td><td>Stride of the source image V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_step_x</td><td>v_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_stride_y</td><td>Stride of the source image V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_step_y</td><td>v_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image V channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">u_output_ptr</td><td>Pointer to the destination U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_x</td><td>Stride of the destination U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_x</td><td>u_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_y</td><td>Stride of the destination image U channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_y</td><td>u_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination U channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">v_output_ptr</td><td>Pointer to the destination V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_x</td><td>Stride of the destination V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_x</td><td>v_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_y</td><td>Stride of the destination V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_y</td><td>v_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination V channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l01633">1633</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l01640"></a><span class="lineno"> 1640</span>&#160;{</div><div class="line"><a name="l01641"></a><span class="lineno"> 1641</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_y  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_input);</div><div class="line"><a name="l01642"></a><span class="lineno"> 1642</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_u  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_input);</div><div class="line"><a name="l01643"></a><span class="lineno"> 1643</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_v  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_input);</div><div class="line"><a name="l01644"></a><span class="lineno"> 1644</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l01645"></a><span class="lineno"> 1645</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_u = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_output);</div><div class="line"><a name="l01646"></a><span class="lineno"> 1646</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_v = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_output);</div><div class="line"><a name="l01647"></a><span class="lineno"> 1647</span>&#160;</div><div class="line"><a name="l01648"></a><span class="lineno"> 1648</span>&#160;    <span class="comment">// handle 32 pixels every time, two lines, each line for 16 pixels</span></div><div class="line"><a name="l01649"></a><span class="lineno"> 1649</span>&#160;    uchar16 luma_0 = vload16(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01650"></a><span class="lineno"> 1650</span>&#160;    uchar16 luma_1 = vload16(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_input_stride_y);</div><div class="line"><a name="l01651"></a><span class="lineno"> 1651</span>&#160;    uchar8  cb_src = vload8(0, in_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01652"></a><span class="lineno"> 1652</span>&#160;    uchar8  cr_src = vload8(0, in_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01653"></a><span class="lineno"> 1653</span>&#160;    uchar16 cb     = (uchar16)(cb_src.s0, cb_src.s0, cb_src.s1, cb_src.s1, cb_src.s2, cb_src.s2, cb_src.s3, cb_src.s3,</div><div class="line"><a name="l01654"></a><span class="lineno"> 1654</span>&#160;                               cb_src.s4, cb_src.s4, cb_src.s5, cb_src.s5, cb_src.s6, cb_src.s6, cb_src.s7, cb_src.s7);</div><div class="line"><a name="l01655"></a><span class="lineno"> 1655</span>&#160;    uchar16 cr = (uchar16)(cr_src.s0, cr_src.s0, cr_src.s1, cr_src.s1, cr_src.s2, cr_src.s2, cr_src.s3, cr_src.s3,</div><div class="line"><a name="l01656"></a><span class="lineno"> 1656</span>&#160;                           cr_src.s4, cr_src.s4, cr_src.s5, cr_src.s5, cr_src.s6, cr_src.s6, cr_src.s7, cr_src.s7);</div><div class="line"><a name="l01657"></a><span class="lineno"> 1657</span>&#160;</div><div class="line"><a name="l01658"></a><span class="lineno"> 1658</span>&#160;    vstore16(luma_0, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01659"></a><span class="lineno"> 1659</span>&#160;    vstore16(luma_1, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_output_stride_y);</div><div class="line"><a name="l01660"></a><span class="lineno"> 1660</span>&#160;    vstore16(cb, 0, out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01661"></a><span class="lineno"> 1661</span>&#160;    vstore16(cb, 0, out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + u_output_stride_y);</div><div class="line"><a name="l01662"></a><span class="lineno"> 1662</span>&#160;    vstore16(cr, 0, out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01663"></a><span class="lineno"> 1663</span>&#160;    vstore16(cr, 0, out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + v_output_stride_y);</div><div class="line"><a name="l01664"></a><span class="lineno"> 1664</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8fb5e7276f3da6febe4e9c48fe085169"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void NV12_to_IYUV_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uv_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an NV12 image to IYUV. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 16), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_ptr</td><td>Pointer to the source luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_x</td><td>Stride of the luma image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_x</td><td>luma_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_y</td><td>Stride of the source luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_y</td><td>luma_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_ptr</td><td>Pointer to the source uv channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_x</td><td>Stride of the source image uv channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_x</td><td>uv_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_y</td><td>uv_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">u_output_ptr</td><td>Pointer to the destination U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_x</td><td>Stride of the destination U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_x</td><td>u_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_y</td><td>Stride of the destination image U channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_y</td><td>u_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination U channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">v_output_ptr</td><td>Pointer to the destination V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_x</td><td>Stride of the destination V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_x</td><td>v_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_y</td><td>Stride of the destination V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_y</td><td>v_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination V channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00949">949</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00955"></a><span class="lineno">  955</span>&#160;{</div><div class="line"><a name="l00956"></a><span class="lineno">  956</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_y  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_input);</div><div class="line"><a name="l00957"></a><span class="lineno">  957</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_uv = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uv_input);</div><div class="line"><a name="l00958"></a><span class="lineno">  958</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l00959"></a><span class="lineno">  959</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_u = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_output);</div><div class="line"><a name="l00960"></a><span class="lineno">  960</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_v = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_output);</div><div class="line"><a name="l00961"></a><span class="lineno">  961</span>&#160;</div><div class="line"><a name="l00962"></a><span class="lineno">  962</span>&#160;    <span class="comment">// handle 32 pixels every time, two lines, each line for 16 pixels</span></div><div class="line"><a name="l00963"></a><span class="lineno">  963</span>&#160;    uchar16 luma_0 = vload16(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00964"></a><span class="lineno">  964</span>&#160;    uchar16 luma_1 = vload16(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_input_stride_y);</div><div class="line"><a name="l00965"></a><span class="lineno">  965</span>&#160;    uchar16 cbcr   = vload16(0, in_uv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00966"></a><span class="lineno">  966</span>&#160;    uchar8  cb     = (uchar8)(cbcr.s0, cbcr.s2, cbcr.s4, cbcr.s6, cbcr.s8, cbcr.sa, cbcr.sc, cbcr.se);</div><div class="line"><a name="l00967"></a><span class="lineno">  967</span>&#160;    uchar8  cr     = (uchar8)(cbcr.s1, cbcr.s3, cbcr.s5, cbcr.s7, cbcr.s9, cbcr.sb, cbcr.sd, cbcr.sf);</div><div class="line"><a name="l00968"></a><span class="lineno">  968</span>&#160;</div><div class="line"><a name="l00969"></a><span class="lineno">  969</span>&#160;    vstore16(luma_0, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00970"></a><span class="lineno">  970</span>&#160;    vstore16(luma_1, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_output_stride_y);</div><div class="line"><a name="l00971"></a><span class="lineno">  971</span>&#160;    vstore8(cb, 0, out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00972"></a><span class="lineno">  972</span>&#160;    vstore8(cr, 0, out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00973"></a><span class="lineno">  973</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a02037a65e2f5ec0579b8ed8efc33ff18"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void NV12_to_RGB888_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uv_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>rgb_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an NV12 image to RGB888. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 4), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_ptr</td><td>Pointer to the source luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_x</td><td>Stride of the luma image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_x</td><td>luma_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_y</td><td>Stride of the source luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_y</td><td>luma_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_ptr</td><td>Pointer to the source uv channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_x</td><td>Stride of the source image uv channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_x</td><td>uv_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_y</td><td>uv_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">rgb_output_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_step_x</td><td>rgb_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_step_y</td><td>output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00410">410</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;{</div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_luma = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_input);</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_uv   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uv_input);</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_rgb = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(rgb_output);</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;    <span class="comment">// handle 8 pixels every time, two lines, each line for 4 pixels</span></div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;    uchar4 luma_0 = vload4(0, in_luma.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;    uchar4 luma_1 = vload4(0, in_luma.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_input_stride_y);</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;    uchar4 cbcr   = vload4(0, in_uv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;    char4  cb     = (char4)(cbcr.s0, cbcr.s0, cbcr.s2, cbcr.s2) - (char4)(128);</div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;    char4  cr     = (char4)(cbcr.s1, cbcr.s1, cbcr.s3, cbcr.s3) - (char4)(128);</div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;</div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;    float4 temp0 = (float4)(0.0000f) + (float4)(0.0000f) * convert_float4(cb) + (float4)(1.5748f) * convert_float4(cr);</div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;    float4 temp1 = (float4)(0.0000f) - (float4)(0.1873f) * convert_float4(cb) - (float4)(0.4681f) * convert_float4(cr);</div><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;    float4 temp2 = (float4)(0.0000f) + (float4)(1.8556f) * convert_float4(cb) + (float4)(0.0000f) * convert_float4(cr);</div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;    float4 f_r = convert_float4(luma_0) + temp0;</div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;    float4 f_g = convert_float4(luma_0) + temp1;</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;    float4 f_b = convert_float4(luma_0) + temp2;</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;    uchar4 r_0 = convert_uchar4_rtz(f_r);</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;    uchar4 g_0 = convert_uchar4_rtz(f_g);</div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;    uchar4 b_0 = convert_uchar4_rtz(f_b);</div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;    uchar8 rgb_0 = (uchar8)(r_0.s0, g_0.s0, b_0.s0, r_0.s1, g_0.s1, b_0.s1, r_0.s2, g_0.s2);</div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;    uchar4 rgb_1 = (uchar4)(b_0.s2, r_0.s3, g_0.s3, b_0.s3);</div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;    vstore8(rgb_0, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;    vstore4(rgb_1, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 8);</div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;</div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;    f_r = convert_float4(luma_1) + temp0;</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;    f_g = convert_float4(luma_1) + temp1;</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;    f_b = convert_float4(luma_1) + temp2;</div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;</div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;    r_0 = convert_uchar4_rtz(f_r);</div><div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;    g_0 = convert_uchar4_rtz(f_g);</div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;    b_0 = convert_uchar4_rtz(f_b);</div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;</div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;    rgb_0 = (uchar8)(r_0.s0, g_0.s0, b_0.s0, r_0.s1, g_0.s1, b_0.s1, r_0.s2, g_0.s2);</div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;    rgb_1 = (uchar4)(b_0.s2, r_0.s3, g_0.s3, b_0.s3);</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;    vstore8(rgb_0, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgb_output_stride_y);</div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;    vstore4(rgb_1, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgb_output_stride_y + 8);</div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a84880a0b48a6d4ff812b07ef7dcf0eda"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void NV12_to_RGBA8888_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uv_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>rgb_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an NV12 image to RGB8888. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 4), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_ptr</td><td>Pointer to the source luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_x</td><td>Stride of the luma image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_x</td><td>luma_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_y</td><td>Stride of the source luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_y</td><td>luma_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_ptr</td><td>Pointer to the source uv channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_x</td><td>Stride of the source image uv channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_x</td><td>uv_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_y</td><td>uv_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">rgb_output_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_step_x</td><td>rgb_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_step_y</td><td>rgb_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00867">867</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00871"></a><span class="lineno">  871</span>&#160;{</div><div class="line"><a name="l00872"></a><span class="lineno">  872</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_luma = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_input);</div><div class="line"><a name="l00873"></a><span class="lineno">  873</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_uv   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uv_input);</div><div class="line"><a name="l00874"></a><span class="lineno">  874</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_rgb = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(rgb_output);</div><div class="line"><a name="l00875"></a><span class="lineno">  875</span>&#160;</div><div class="line"><a name="l00876"></a><span class="lineno">  876</span>&#160;    uchar4 luma_0 = vload4(0, in_luma.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00877"></a><span class="lineno">  877</span>&#160;    uchar4 luma_1 = vload4(0, in_luma.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_input_stride_y);</div><div class="line"><a name="l00878"></a><span class="lineno">  878</span>&#160;    uchar4 cbcr   = vload4(0, in_uv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00879"></a><span class="lineno">  879</span>&#160;    char4  cb     = (char4)(cbcr.s0, cbcr.s0, cbcr.s2, cbcr.s2) - (char4)(128);</div><div class="line"><a name="l00880"></a><span class="lineno">  880</span>&#160;    char4  cr     = (char4)(cbcr.s1, cbcr.s1, cbcr.s3, cbcr.s3) - (char4)(128);</div><div class="line"><a name="l00881"></a><span class="lineno">  881</span>&#160;</div><div class="line"><a name="l00882"></a><span class="lineno">  882</span>&#160;    float4 temp0 = (float4)(0.0000f) + (float4)(0.0000f) * convert_float4(cb) + (float4)(1.5748f) * convert_float4(cr);</div><div class="line"><a name="l00883"></a><span class="lineno">  883</span>&#160;    float4 temp1 = (float4)(0.0000f) - (float4)(0.1873f) * convert_float4(cb) - (float4)(0.4681f) * convert_float4(cr);</div><div class="line"><a name="l00884"></a><span class="lineno">  884</span>&#160;    float4 temp2 = (float4)(0.0000f) + (float4)(1.8556f) * convert_float4(cb) + (float4)(0.0000f) * convert_float4(cr);</div><div class="line"><a name="l00885"></a><span class="lineno">  885</span>&#160;</div><div class="line"><a name="l00886"></a><span class="lineno">  886</span>&#160;    float4 f_r = convert_float4(luma_0) + temp0;</div><div class="line"><a name="l00887"></a><span class="lineno">  887</span>&#160;    float4 f_g = convert_float4(luma_0) + temp1;</div><div class="line"><a name="l00888"></a><span class="lineno">  888</span>&#160;    float4 f_b = convert_float4(luma_0) + temp2;</div><div class="line"><a name="l00889"></a><span class="lineno">  889</span>&#160;</div><div class="line"><a name="l00890"></a><span class="lineno">  890</span>&#160;    uchar4 r_0 = convert_uchar4_rtz(f_r);</div><div class="line"><a name="l00891"></a><span class="lineno">  891</span>&#160;    uchar4 g_0 = convert_uchar4_rtz(f_g);</div><div class="line"><a name="l00892"></a><span class="lineno">  892</span>&#160;    uchar4 b_0 = convert_uchar4_rtz(f_b);</div><div class="line"><a name="l00893"></a><span class="lineno">  893</span>&#160;</div><div class="line"><a name="l00894"></a><span class="lineno">  894</span>&#160;    uchar8 rgb_0 = (uchar8)(r_0.s0, g_0.s0, b_0.s0, 255, r_0.s1, g_0.s1, b_0.s1, 255);</div><div class="line"><a name="l00895"></a><span class="lineno">  895</span>&#160;    uchar8 rgb_1 = (uchar8)(r_0.s2, g_0.s2, b_0.s2, 255, r_0.s3, g_0.s3, b_0.s3, 255);</div><div class="line"><a name="l00896"></a><span class="lineno">  896</span>&#160;    vstore8(rgb_0, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00897"></a><span class="lineno">  897</span>&#160;    vstore8(rgb_1, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 8);</div><div class="line"><a name="l00898"></a><span class="lineno">  898</span>&#160;</div><div class="line"><a name="l00899"></a><span class="lineno">  899</span>&#160;    f_r = convert_float4(luma_1) + temp0;</div><div class="line"><a name="l00900"></a><span class="lineno">  900</span>&#160;    f_g = convert_float4(luma_1) + temp1;</div><div class="line"><a name="l00901"></a><span class="lineno">  901</span>&#160;    f_b = convert_float4(luma_1) + temp2;</div><div class="line"><a name="l00902"></a><span class="lineno">  902</span>&#160;</div><div class="line"><a name="l00903"></a><span class="lineno">  903</span>&#160;    r_0 = convert_uchar4_rtz(f_r);</div><div class="line"><a name="l00904"></a><span class="lineno">  904</span>&#160;    g_0 = convert_uchar4_rtz(f_g);</div><div class="line"><a name="l00905"></a><span class="lineno">  905</span>&#160;    b_0 = convert_uchar4_rtz(f_b);</div><div class="line"><a name="l00906"></a><span class="lineno">  906</span>&#160;</div><div class="line"><a name="l00907"></a><span class="lineno">  907</span>&#160;    rgb_0 = (uchar8)(r_0.s0, g_0.s0, b_0.s0, 255, r_0.s1, g_0.s1, b_0.s1, 255);</div><div class="line"><a name="l00908"></a><span class="lineno">  908</span>&#160;    rgb_1 = (uchar8)(r_0.s2, g_0.s2, b_0.s2, 255, r_0.s3, g_0.s3, b_0.s3, 255);</div><div class="line"><a name="l00909"></a><span class="lineno">  909</span>&#160;    vstore8(rgb_0, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgb_output_stride_y);</div><div class="line"><a name="l00910"></a><span class="lineno">  910</span>&#160;    vstore8(rgb_1, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgb_output_stride_y + 8);</div><div class="line"><a name="l00911"></a><span class="lineno">  911</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a2c05435371a2cb1b2782d0a434407150"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void NV12_to_YUV444_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uv_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an NV12 image to YUV444. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 16), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_ptr</td><td>Pointer to the source luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_x</td><td>Stride of the luma image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_x</td><td>luma_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_y</td><td>Stride of the source luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_y</td><td>luma_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_ptr</td><td>Pointer to the source uv channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_x</td><td>Stride of the source image uv channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_x</td><td>uv_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_y</td><td>uv_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">u_output_ptr</td><td>Pointer to the destination U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_x</td><td>Stride of the destination U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_x</td><td>u_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_y</td><td>Stride of the destination image U channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_y</td><td>u_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination U channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">v_output_ptr</td><td>Pointer to the destination V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_x</td><td>Stride of the destination V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_x</td><td>v_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_y</td><td>Stride of the destination V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_y</td><td>v_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination V channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l01011">1011</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160;{</div><div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_y  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_input);</div><div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_uv = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uv_input);</div><div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_u = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_output);</div><div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_v = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_output);</div><div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>&#160;</div><div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>&#160;    <span class="comment">// handle 32 pixels every time, two lines, each line for 16 pixels</span></div><div class="line"><a name="l01025"></a><span class="lineno"> 1025</span>&#160;    uchar16 luma_0 = vload16(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>&#160;    uchar16 luma_1 = vload16(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_input_stride_y);</div><div class="line"><a name="l01027"></a><span class="lineno"> 1027</span>&#160;    uchar16 cbcr   = vload16(0, in_uv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01028"></a><span class="lineno"> 1028</span>&#160;    uchar16 cb     = (uchar16)(cbcr.s0, cbcr.s0, cbcr.s2, cbcr.s2, cbcr.s4, cbcr.s4, cbcr.s6, cbcr.s6, cbcr.s8, cbcr.s8,</div><div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>&#160;                               cbcr.sa, cbcr.sa, cbcr.sc, cbcr.sc, cbcr.se, cbcr.se);</div><div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160;    uchar16 cr = (uchar16)(cbcr.s1, cbcr.s1, cbcr.s3, cbcr.s3, cbcr.s5, cbcr.s5, cbcr.s7, cbcr.s7, cbcr.s9, cbcr.s9,</div><div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>&#160;                           cbcr.sb, cbcr.sb, cbcr.sd, cbcr.sd, cbcr.sf, cbcr.sf);</div><div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160;</div><div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>&#160;    vstore16(luma_0, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>&#160;    vstore16(luma_1, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_output_stride_y);</div><div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>&#160;    vstore16(cb, 0, out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>&#160;    vstore16(cb, 0, out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + u_output_stride_y);</div><div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160;    vstore16(cr, 0, out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;    vstore16(cr, 0, out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + v_output_stride_y);</div><div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="acfdf02c3ab4893afc7e05afc3a950555"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void NV21_to_IYUV_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uv_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an NV21 image to IYUV. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 16), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_ptr</td><td>Pointer to the source luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_x</td><td>Stride of the luma image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_x</td><td>luma_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_y</td><td>Stride of the source luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_y</td><td>luma_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_ptr</td><td>Pointer to the source uv channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_x</td><td>Stride of the source image uv channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_x</td><td>uv_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_y</td><td>uv_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">u_output_ptr</td><td>Pointer to the destination U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_x</td><td>Stride of the destination U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_x</td><td>u_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_y</td><td>Stride of the destination image U channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_y</td><td>u_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination U channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">v_output_ptr</td><td>Pointer to the destination V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_x</td><td>Stride of the destination V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_x</td><td>v_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_y</td><td>Stride of the destination V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_y</td><td>v_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination V channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l01285">1285</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l01291"></a><span class="lineno"> 1291</span>&#160;{</div><div class="line"><a name="l01292"></a><span class="lineno"> 1292</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_y  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_input);</div><div class="line"><a name="l01293"></a><span class="lineno"> 1293</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_uv = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uv_input);</div><div class="line"><a name="l01294"></a><span class="lineno"> 1294</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l01295"></a><span class="lineno"> 1295</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_u = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_output);</div><div class="line"><a name="l01296"></a><span class="lineno"> 1296</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_v = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_output);</div><div class="line"><a name="l01297"></a><span class="lineno"> 1297</span>&#160;</div><div class="line"><a name="l01298"></a><span class="lineno"> 1298</span>&#160;    uchar16 luma_0 = vload16(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01299"></a><span class="lineno"> 1299</span>&#160;    uchar16 luma_1 = vload16(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_input_stride_y);</div><div class="line"><a name="l01300"></a><span class="lineno"> 1300</span>&#160;    uchar16 cbcr   = vload16(0, in_uv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01301"></a><span class="lineno"> 1301</span>&#160;    uchar8  cr     = (uchar8)(cbcr.s0, cbcr.s2, cbcr.s4, cbcr.s6, cbcr.s8, cbcr.sa, cbcr.sc, cbcr.se);</div><div class="line"><a name="l01302"></a><span class="lineno"> 1302</span>&#160;    uchar8  cb     = (uchar8)(cbcr.s1, cbcr.s3, cbcr.s5, cbcr.s7, cbcr.s9, cbcr.sb, cbcr.sd, cbcr.sf);</div><div class="line"><a name="l01303"></a><span class="lineno"> 1303</span>&#160;</div><div class="line"><a name="l01304"></a><span class="lineno"> 1304</span>&#160;    vstore16(luma_0, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01305"></a><span class="lineno"> 1305</span>&#160;    vstore16(luma_1, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_output_stride_y);</div><div class="line"><a name="l01306"></a><span class="lineno"> 1306</span>&#160;    vstore8(cb, 0, out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01307"></a><span class="lineno"> 1307</span>&#160;    vstore8(cr, 0, out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01308"></a><span class="lineno"> 1308</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a57f0e4cc61a99718caaaaab82d393009"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void NV21_to_RGB888_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uv_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>rgb_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an NV21 image to RGB888. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 4), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_ptr</td><td>Pointer to the source luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_x</td><td>Stride of the luma image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_x</td><td>luma_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_y</td><td>Stride of the source luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_y</td><td>luma_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_ptr</td><td>Pointer to the source uv channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_x</td><td>Stride of the source image uv channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_x</td><td>uv_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_y</td><td>uv_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">rgb_output_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_step_x</td><td>rgb_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_step_y</td><td>output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l01065">1065</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>&#160;{</div><div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_y    = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_input);</div><div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_uv   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uv_input);</div><div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_rgb = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(rgb_output);</div><div class="line"><a name="l01073"></a><span class="lineno"> 1073</span>&#160;</div><div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>&#160;    <span class="comment">// handle 8 pixels every time, two lines, each line for 4 pixels</span></div><div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>&#160;    uchar4 luma_0 = vload4(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>&#160;    uchar4 luma_1 = vload4(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_input_stride_y);</div><div class="line"><a name="l01077"></a><span class="lineno"> 1077</span>&#160;    uchar4 cbcr   = vload4(0, in_uv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>&#160;    char4  cr     = (char4)(cbcr.s0, cbcr.s0, cbcr.s2, cbcr.s2) - (char4)(128);</div><div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>&#160;    char4  cb     = (char4)(cbcr.s1, cbcr.s1, cbcr.s3, cbcr.s3) - (char4)(128);</div><div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>&#160;</div><div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>&#160;    float4 temp0 = (float4)(0.0000f) + (float4)(0.0000f) * convert_float4(cb) + (float4)(1.5748f) * convert_float4(cr);</div><div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>&#160;    float4 temp1 = (float4)(0.0000f) - (float4)(0.1873f) * convert_float4(cb) - (float4)(0.4681f) * convert_float4(cr);</div><div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160;    float4 temp2 = (float4)(0.0000f) + (float4)(1.8556f) * convert_float4(cb) + (float4)(0.0000f) * convert_float4(cr);</div><div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>&#160;</div><div class="line"><a name="l01085"></a><span class="lineno"> 1085</span>&#160;    float4 f_r = convert_float4(luma_0) + temp0;</div><div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>&#160;    float4 f_g = convert_float4(luma_0) + temp1;</div><div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>&#160;    float4 f_b = convert_float4(luma_0) + temp2;</div><div class="line"><a name="l01088"></a><span class="lineno"> 1088</span>&#160;</div><div class="line"><a name="l01089"></a><span class="lineno"> 1089</span>&#160;    uchar4 r_0 = convert_uchar4_rtz(f_r);</div><div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>&#160;    uchar4 g_0 = convert_uchar4_rtz(f_g);</div><div class="line"><a name="l01091"></a><span class="lineno"> 1091</span>&#160;    uchar4 b_0 = convert_uchar4_rtz(f_b);</div><div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>&#160;</div><div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>&#160;    uchar8 rgb_0 = (uchar8)(r_0.s0, g_0.s0, b_0.s0, r_0.s1, g_0.s1, b_0.s1, r_0.s2, g_0.s2);</div><div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>&#160;    uchar4 rgb_1 = (uchar4)(b_0.s2, r_0.s3, g_0.s3, b_0.s3);</div><div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>&#160;    vstore8(rgb_0, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01096"></a><span class="lineno"> 1096</span>&#160;    vstore4(rgb_1, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 8);</div><div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>&#160;</div><div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>&#160;    f_r = convert_float4(luma_1) + temp0;</div><div class="line"><a name="l01099"></a><span class="lineno"> 1099</span>&#160;    f_g = convert_float4(luma_1) + temp1;</div><div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>&#160;    f_b = convert_float4(luma_1) + temp2;</div><div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>&#160;</div><div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>&#160;    r_0 = convert_uchar4_rtz(f_r);</div><div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>&#160;    g_0 = convert_uchar4_rtz(f_g);</div><div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>&#160;    b_0 = convert_uchar4_rtz(f_b);</div><div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>&#160;</div><div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>&#160;    rgb_0 = (uchar8)(r_0.s0, g_0.s0, b_0.s0, r_0.s1, g_0.s1, b_0.s1, r_0.s2, g_0.s2);</div><div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160;    rgb_1 = (uchar4)(b_0.s2, r_0.s3, g_0.s3, b_0.s3);</div><div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>&#160;    vstore8(rgb_0, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgb_output_stride_y);</div><div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>&#160;    vstore4(rgb_1, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgb_output_stride_y + 8);</div><div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad96db99a88669713407e91c036b06df2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void NV21_to_RGBA8888_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uv_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>rgba_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an NV12 image to RGB8888. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 4), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_ptr</td><td>Pointer to the source luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_x</td><td>Stride of the luma image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_x</td><td>luma_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_y</td><td>Stride of the source luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_y</td><td>luma_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_ptr</td><td>Pointer to the source uv channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_x</td><td>Stride of the source image uv channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_x</td><td>uv_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_y</td><td>uv_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">rgba_output_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_output_step_x</td><td>rgba_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_output_step_y</td><td>rgba_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l01136">1136</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>&#160;{</div><div class="line"><a name="l01141"></a><span class="lineno"> 1141</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_luma = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_input);</div><div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_uv   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uv_input);</div><div class="line"><a name="l01143"></a><span class="lineno"> 1143</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_rgb = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(rgba_output);</div><div class="line"><a name="l01144"></a><span class="lineno"> 1144</span>&#160;</div><div class="line"><a name="l01145"></a><span class="lineno"> 1145</span>&#160;    <span class="comment">// handle 8 pixels every time, two lines, each line for 4 pixels</span></div><div class="line"><a name="l01146"></a><span class="lineno"> 1146</span>&#160;    uchar4 luma_0 = vload4(0, in_luma.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01147"></a><span class="lineno"> 1147</span>&#160;    uchar4 luma_1 = vload4(0, in_luma.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_input_stride_y);</div><div class="line"><a name="l01148"></a><span class="lineno"> 1148</span>&#160;    uchar4 cbcr   = vload4(0, in_uv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01149"></a><span class="lineno"> 1149</span>&#160;    char4  cr     = (char4)(cbcr.s0, cbcr.s0, cbcr.s2, cbcr.s2) - (char4)(128);</div><div class="line"><a name="l01150"></a><span class="lineno"> 1150</span>&#160;    char4  cb     = (char4)(cbcr.s1, cbcr.s1, cbcr.s3, cbcr.s3) - (char4)(128);</div><div class="line"><a name="l01151"></a><span class="lineno"> 1151</span>&#160;</div><div class="line"><a name="l01152"></a><span class="lineno"> 1152</span>&#160;    float4 temp0 = (float4)(0.0000f) + (float4)(0.0000f) * convert_float4(cb) + (float4)(1.5748f) * convert_float4(cr);</div><div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>&#160;    float4 temp1 = (float4)(0.0000f) - (float4)(0.1873f) * convert_float4(cb) - (float4)(0.4681f) * convert_float4(cr);</div><div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>&#160;    float4 temp2 = (float4)(0.0000f) + (float4)(1.8556f) * convert_float4(cb) + (float4)(0.0000f) * convert_float4(cr);</div><div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>&#160;</div><div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>&#160;    float4 f_r = convert_float4(luma_0) + temp0;</div><div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>&#160;    float4 f_g = convert_float4(luma_0) + temp1;</div><div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>&#160;    float4 f_b = convert_float4(luma_0) + temp2;</div><div class="line"><a name="l01159"></a><span class="lineno"> 1159</span>&#160;</div><div class="line"><a name="l01160"></a><span class="lineno"> 1160</span>&#160;    uchar4 r_0 = convert_uchar4_rtz(f_r);</div><div class="line"><a name="l01161"></a><span class="lineno"> 1161</span>&#160;    uchar4 g_0 = convert_uchar4_rtz(f_g);</div><div class="line"><a name="l01162"></a><span class="lineno"> 1162</span>&#160;    uchar4 b_0 = convert_uchar4_rtz(f_b);</div><div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>&#160;</div><div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>&#160;    uchar8 rgb_0 = (uchar8)(r_0.s0, g_0.s0, b_0.s0, 255, r_0.s1, g_0.s1, b_0.s1, 255);</div><div class="line"><a name="l01165"></a><span class="lineno"> 1165</span>&#160;    uchar8 rgb_1 = (uchar8)(r_0.s2, g_0.s2, b_0.s2, 255, r_0.s3, g_0.s3, b_0.s3, 255);</div><div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>&#160;    vstore8(rgb_0, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01167"></a><span class="lineno"> 1167</span>&#160;    vstore8(rgb_1, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 8);</div><div class="line"><a name="l01168"></a><span class="lineno"> 1168</span>&#160;</div><div class="line"><a name="l01169"></a><span class="lineno"> 1169</span>&#160;    f_r = convert_float4(luma_1) + temp0;</div><div class="line"><a name="l01170"></a><span class="lineno"> 1170</span>&#160;    f_g = convert_float4(luma_1) + temp1;</div><div class="line"><a name="l01171"></a><span class="lineno"> 1171</span>&#160;    f_b = convert_float4(luma_1) + temp2;</div><div class="line"><a name="l01172"></a><span class="lineno"> 1172</span>&#160;</div><div class="line"><a name="l01173"></a><span class="lineno"> 1173</span>&#160;    r_0 = convert_uchar4_rtz(f_r);</div><div class="line"><a name="l01174"></a><span class="lineno"> 1174</span>&#160;    g_0 = convert_uchar4_rtz(f_g);</div><div class="line"><a name="l01175"></a><span class="lineno"> 1175</span>&#160;    b_0 = convert_uchar4_rtz(f_b);</div><div class="line"><a name="l01176"></a><span class="lineno"> 1176</span>&#160;</div><div class="line"><a name="l01177"></a><span class="lineno"> 1177</span>&#160;    rgb_0 = (uchar8)(r_0.s0, g_0.s0, b_0.s0, 255, r_0.s1, g_0.s1, b_0.s1, 255);</div><div class="line"><a name="l01178"></a><span class="lineno"> 1178</span>&#160;    rgb_1 = (uchar8)(r_0.s2, g_0.s2, b_0.s2, 255, r_0.s3, g_0.s3, b_0.s3, 255);</div><div class="line"><a name="l01179"></a><span class="lineno"> 1179</span>&#160;    vstore8(rgb_0, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgba_output_stride_y);</div><div class="line"><a name="l01180"></a><span class="lineno"> 1180</span>&#160;    vstore8(rgb_1, 0, out_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgba_output_stride_y + 8);</div><div class="line"><a name="l01181"></a><span class="lineno"> 1181</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="abd3f622e7d731ae70306266b334ff33b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void NV21_to_YUV444_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uv_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an NV21 image to YUV444. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 16), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_ptr</td><td>Pointer to the source luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_x</td><td>Stride of the luma image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_x</td><td>luma_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_stride_y</td><td>Stride of the source luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_step_y</td><td>luma_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_ptr</td><td>Pointer to the source uv channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_x</td><td>Stride of the source image uv channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_x</td><td>uv_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_step_y</td><td>uv_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">u_output_ptr</td><td>Pointer to the destination U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_x</td><td>Stride of the destination U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_x</td><td>u_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_y</td><td>Stride of the destination image U channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_y</td><td>u_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination U channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">v_output_ptr</td><td>Pointer to the destination V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_x</td><td>Stride of the destination V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_x</td><td>v_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_y</td><td>Stride of the destination V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_y</td><td>v_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination V channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l01219">1219</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>&#160;{</div><div class="line"><a name="l01226"></a><span class="lineno"> 1226</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_y  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_input);</div><div class="line"><a name="l01227"></a><span class="lineno"> 1227</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_uv = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uv_input);</div><div class="line"><a name="l01228"></a><span class="lineno"> 1228</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l01229"></a><span class="lineno"> 1229</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_u = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_output);</div><div class="line"><a name="l01230"></a><span class="lineno"> 1230</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_v = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_output);</div><div class="line"><a name="l01231"></a><span class="lineno"> 1231</span>&#160;</div><div class="line"><a name="l01232"></a><span class="lineno"> 1232</span>&#160;    <span class="comment">// handle 32 pixels every time, two lines, each line for 16 pixels</span></div><div class="line"><a name="l01233"></a><span class="lineno"> 1233</span>&#160;    uchar16 luma_0 = vload16(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01234"></a><span class="lineno"> 1234</span>&#160;    uchar16 luma_1 = vload16(0, in_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_input_stride_y);</div><div class="line"><a name="l01235"></a><span class="lineno"> 1235</span>&#160;    uchar16 cbcr   = vload16(0, in_uv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01236"></a><span class="lineno"> 1236</span>&#160;    uchar16 cr     = (uchar16)(cbcr.s0, cbcr.s0, cbcr.s2, cbcr.s2, cbcr.s4, cbcr.s4, cbcr.s6, cbcr.s6, cbcr.s8, cbcr.s8,</div><div class="line"><a name="l01237"></a><span class="lineno"> 1237</span>&#160;                               cbcr.sa, cbcr.sa, cbcr.sc, cbcr.sc, cbcr.se, cbcr.se);</div><div class="line"><a name="l01238"></a><span class="lineno"> 1238</span>&#160;    uchar16 cb = (uchar16)(cbcr.s1, cbcr.s1, cbcr.s3, cbcr.s3, cbcr.s5, cbcr.s5, cbcr.s7, cbcr.s7, cbcr.s9, cbcr.s9,</div><div class="line"><a name="l01239"></a><span class="lineno"> 1239</span>&#160;                           cbcr.sb, cbcr.sb, cbcr.sd, cbcr.sd, cbcr.sf, cbcr.sf);</div><div class="line"><a name="l01240"></a><span class="lineno"> 1240</span>&#160;</div><div class="line"><a name="l01241"></a><span class="lineno"> 1241</span>&#160;    vstore16(luma_0, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01242"></a><span class="lineno"> 1242</span>&#160;    vstore16(luma_1, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_output_stride_y);</div><div class="line"><a name="l01243"></a><span class="lineno"> 1243</span>&#160;    vstore16(cb, 0, out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01244"></a><span class="lineno"> 1244</span>&#160;    vstore16(cb, 0, out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + u_output_stride_y);</div><div class="line"><a name="l01245"></a><span class="lineno"> 1245</span>&#160;    vstore16(cr, 0, out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01246"></a><span class="lineno"> 1246</span>&#160;    vstore16(cr, 0, out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + v_output_stride_y);</div><div class="line"><a name="l01247"></a><span class="lineno"> 1247</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a0e87467985f2b64c5aaf073ee5c64267"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void RGB888_to_IYUV_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>rgb_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a RGB image to IYUV using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 2), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_input_step_y</td><td>rgb_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">u_output_ptr</td><td>Pointer to the destination U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_x</td><td>Stride of the destination U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_x</td><td>u_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_y</td><td>Stride of the destination image U channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_y</td><td>u_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination U channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">v_output_ptr</td><td>Pointer to the destination V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_x</td><td>Stride of the destination V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_x</td><td>v_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_y</td><td>Stride of the destination V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_y</td><td>v_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination V channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00554">554</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;{</div><div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;    <span class="comment">// handle 4 pixels every time, two lines, each line for 2 pixels</span></div><div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_rgb = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(rgb_input);</div><div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_u  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_output);</div><div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_v  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_output);</div><div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;</div><div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;    <span class="comment">// Read 2 pixel of the first line</span></div><div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;    uchar8 rgb_0 = vload8(0, in_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;    uchar2 r_0   = (uchar2)(rgb_0.s0, rgb_0.s3);</div><div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;    uchar2 g_0   = (uchar2)(rgb_0.s1, rgb_0.s4);</div><div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;    uchar2 b_0   = (uchar2)(rgb_0.s2, rgb_0.s5);</div><div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;</div><div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;    float2 f_y = (float2)(0.0000f) + (float2)(0.2126f) * convert_float2(r_0) + (float2)(0.7152f) * convert_float2(g_0) + (float2)(0.0722f) * convert_float2(b_0);</div><div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;    float2 f_u = (float2)(0.0000f) - (float2)(0.1146f) * convert_float2(r_0) - (float2)(0.3854f) * convert_float2(g_0) + (float2)(0.5000f) * convert_float2(b_0);</div><div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;    float2 f_v = (float2)(0.0000f) + (float2)(0.5000f) * convert_float2(r_0) - (float2)(0.4542f) * convert_float2(g_0) - (float2)(0.0458f) * convert_float2(b_0);</div><div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;</div><div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;    short2 i_y = convert_short2_rtz(f_y);</div><div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;    short2 i_u = convert_short2_rtz(f_u) + (short2)(128);</div><div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;    short2 i_v = convert_short2_rtz(f_v) + (short2)(128);</div><div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;</div><div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;    uchar2 luma_0 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_y, (short2)(255))));</div><div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;    vstore2(luma_0, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;</div><div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;    uchar2 cb_0 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_u, (short2)(255))));</div><div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;    uchar2 cr_0 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_v, (short2)(255))));</div><div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;</div><div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;    <span class="comment">// Read 2 pixel of the second line</span></div><div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;    uchar8 rgb_1 = vload8(0, in_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgb_input_stride_y);</div><div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;    uchar2 r_1   = (uchar2)(rgb_1.s0, rgb_1.s3);</div><div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;    uchar2 g_1   = (uchar2)(rgb_1.s1, rgb_1.s4);</div><div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;    uchar2 b_1   = (uchar2)(rgb_1.s2, rgb_1.s5);</div><div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;</div><div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;    f_y = (float2)(0.0000f) + (float2)(0.2126f) * convert_float2(r_1) + (float2)(0.7152f) * convert_float2(g_1) + (float2)(0.0722f) * convert_float2(b_1);</div><div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;    f_u = (float2)(0.0000f) - (float2)(0.1146f) * convert_float2(r_1) - (float2)(0.3854f) * convert_float2(g_1) + (float2)(0.5000f) * convert_float2(b_1);</div><div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;    f_v = (float2)(0.0000f) + (float2)(0.5000f) * convert_float2(r_1) - (float2)(0.4542f) * convert_float2(g_1) - (float2)(0.0458f) * convert_float2(b_1);</div><div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;</div><div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;    i_y = convert_short2_rtz(f_y);</div><div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;    i_u = convert_short2_rtz(f_u) + (short2)(128);</div><div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;    i_v = convert_short2_rtz(f_v) + (short2)(128);</div><div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;</div><div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;    uchar2 luma_1 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_y, (short2)(255))));</div><div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;    vstore2(luma_1, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_output_stride_y);</div><div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;</div><div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;    uchar2 cb_1 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_u, (short2)(255))));</div><div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;    uchar2 cr_1 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_v, (short2)(255))));</div><div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;    uchar2 cbcr = (uchar2)(((cb_0.s0 + cb_0.s1 + cb_1.s0 + cb_1.s1) / 4),</div><div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;                           ((cr_0.s0 + cr_0.s1 + cr_1.s0 + cr_1.s1) / 4));</div><div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;    *out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> = cbcr.x;</div><div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;    *out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> = cbcr.y;</div><div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aabcf39e3917f842dbc5fbb0d802f24d5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">arm_compute::test::fixed_point_arithmetic::detail::min</a></div><div class="ttdeci">fixed_point&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">FixedPoint.h:897</a></div></div>
<div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">FixedPoint.h:902</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aa07d313ff115012737d4b522efc6079f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void RGB888_to_NV12_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uv_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a RGB image to NV12 using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 4), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_y</td><td>input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_step_x</td><td>luma_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_step_y</td><td>luma_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">uv_ptr</td><td>Pointer to the destination uv channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_stride_x</td><td>Stride of the destination uv channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_step_x</td><td>uv_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_step_y</td><td>uv_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image uv channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00325">325</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;{</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in     = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(input);</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma);</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_uv = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uv);</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;    <span class="comment">// handle 4 pixels every time, two lines, each line for 2 pixels</span></div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;    <span class="comment">// Read 2 pixel of the first line</span></div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    uchar8 rgb_0 = vload8(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;    uchar2 r_0   = (uchar2)(rgb_0.s0, rgb_0.s3);</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    uchar2 g_0   = (uchar2)(rgb_0.s1, rgb_0.s4);</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;    uchar2 b_0   = (uchar2)(rgb_0.s2, rgb_0.s5);</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    float2 f_y = (float2)(0.0000f) + (float2)(0.2126f) * convert_float2(r_0) + (float2)(0.7152f) * convert_float2(g_0) + (float2)(0.0722f) * convert_float2(b_0);</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;    float2 f_u = (float2)(0.0000f) - (float2)(0.1146f) * convert_float2(r_0) - (float2)(0.3854f) * convert_float2(g_0) + (float2)(0.5000f) * convert_float2(b_0);</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;    float2 f_v = (float2)(0.0000f) + (float2)(0.5000f) * convert_float2(r_0) - (float2)(0.4542f) * convert_float2(g_0) - (float2)(0.0458f) * convert_float2(b_0);</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;    short2 i_y = convert_short2_rtz(f_y);</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;    short2 i_u = convert_short2_rtz(f_u) + (short2)(128);</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;    short2 i_v = convert_short2_rtz(f_v) + (short2)(128);</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;    uchar2 luma_0 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_y, (short2)(255))));</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    vstore2(luma_0, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;    uchar2 cb_0 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_u, (short2)(255))));</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;    uchar2 cr_0 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_v, (short2)(255))));</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;    <span class="comment">// Read 2 pixel of the second line</span></div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;    uchar8 rgb_1 = vload8(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + input_stride_y);</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;    uchar2 r_1   = (uchar2)(rgb_1.s0, rgb_1.s3);</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;    uchar2 g_1   = (uchar2)(rgb_1.s1, rgb_1.s4);</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;    uchar2 b_1   = (uchar2)(rgb_1.s2, rgb_1.s5);</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;    f_y = (float2)(0.0000f) + (float2)(0.2126f) * convert_float2(r_1) + (float2)(0.7152f) * convert_float2(g_1) + (float2)(0.0722f) * convert_float2(b_1);</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    f_u = (float2)(0.0000f) - (float2)(0.1146f) * convert_float2(r_1) - (float2)(0.3854f) * convert_float2(g_1) + (float2)(0.5000f) * convert_float2(b_1);</div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;    f_v = (float2)(0.0000f) + (float2)(0.5000f) * convert_float2(r_1) - (float2)(0.4542f) * convert_float2(g_1) - (float2)(0.0458f) * convert_float2(b_1);</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;</div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;    i_y = convert_short2_rtz(f_y);</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;    i_u = convert_short2_rtz(f_u) + (short2)(128);</div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;    i_v = convert_short2_rtz(f_v) + (short2)(128);</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;    uchar2 luma_1 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_y, (short2)(255))));</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;    vstore2(luma_1, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_stride_y);</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;    uchar2 cb_1 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_u, (short2)(255))));</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    uchar2 cr_1 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_v, (short2)(255))));</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;    uchar2 cbcr = (uchar2)(((cb_0.s0 + cb_0.s1 + cb_1.s0 + cb_1.s1) / 4),</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;                           ((cr_0.s0 + cr_0.s1 + cr_1.s0 + cr_1.s1) / 4));</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;    vstore2(cbcr, 0, out_uv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aabcf39e3917f842dbc5fbb0d802f24d5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">arm_compute::test::fixed_point_arithmetic::detail::min</a></div><div class="ttdeci">fixed_point&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">FixedPoint.h:897</a></div></div>
<div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">FixedPoint.h:902</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a2a21de930ca0898bed0a081f40cb4406"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void RGB888_to_RGBA8888_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an RGB888 image to RGBX8888. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 16), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_y</td><td>input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_step_x</td><td>output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_step_y</td><td>output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00044">44</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;{</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(input);</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(output);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="comment">// handle 16 pixels every time</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    uchar16 rgb_0 = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    uchar16 rgb_1 = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 16);</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    uchar16 rgb_2 = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 32);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    uchar16 rgba_0 = (uchar16)(rgb_0.s012, 255, rgb_0.s345, 255, rgb_0.s678, 255, rgb_0.s9ab, 255);</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    uchar16 rgba_1 = (uchar16)(rgb_0.scde, 255, rgb_0.sf, rgb_1.s01, 255, rgb_1.s234, 255, rgb_1.s567, 255);</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    uchar16 rgba_2 = (uchar16)(rgb_1.s89a, 255, rgb_1.sbcd, 255, rgb_1.sef, rgb_2.s0, 255, rgb_2.s123, 255);</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    uchar16 rgba_3 = (uchar16)(rgb_2.s456, 255, rgb_2.s789, 255, rgb_2.sabc, 255, rgb_2.sdef, 255);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    vstore16(rgba_0, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    vstore16(rgba_1, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 16);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    vstore16(rgba_2, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 32);</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    vstore16(rgba_3, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 48);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a917c100f2da4a0e773bb63dd4f87de0b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void RGB888_to_YUV444_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>rgb_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgb_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a RGB image to YUV444 using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 4), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_input_step_y</td><td>rgb_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgb_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">u_output_ptr</td><td>Pointer to the destination U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_x</td><td>Stride of the destination U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_x</td><td>u_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_y</td><td>Stride of the destination image U channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_y</td><td>u_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination U channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">v_output_ptr</td><td>Pointer to the destination V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_x</td><td>Stride of the destination V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_x</td><td>v_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_y</td><td>Stride of the destination image V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_y</td><td>v_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination V channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00488">488</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;{</div><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;    <span class="comment">// handle 4 pixels every time</span></div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_rgb = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(rgb_input);</div><div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_u  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_output);</div><div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_v  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_output);</div><div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;</div><div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;    <span class="comment">// Read 4 pixel</span></div><div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;    uchar16 rgb_0 = vload16(0, in_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;    uchar4  r_0   = (uchar4)(rgb_0.s0, rgb_0.s3, rgb_0.s6, rgb_0.s9);</div><div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;    uchar4  g_0   = (uchar4)(rgb_0.s1, rgb_0.s4, rgb_0.s7, rgb_0.sa);</div><div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;    uchar4  b_0   = (uchar4)(rgb_0.s2, rgb_0.s5, rgb_0.s8, rgb_0.sb);</div><div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;</div><div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;    float4 f_y = (float4)(0.0000f) + (float4)(0.2126f) * convert_float4(r_0) + (float4)(0.7152f) * convert_float4(g_0) + (float4)(0.0722f) * convert_float4(b_0);</div><div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;    float4 f_u = (float4)(0.0000f) - (float4)(0.1146f) * convert_float4(r_0) - (float4)(0.3854f) * convert_float4(g_0) + (float4)(0.5000f) * convert_float4(b_0);</div><div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;    float4 f_v = (float4)(0.0000f) + (float4)(0.5000f) * convert_float4(r_0) - (float4)(0.4542f) * convert_float4(g_0) - (float4)(0.0458f) * convert_float4(b_0);</div><div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;</div><div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;    short4 i_y = convert_short4_rtz(f_y);</div><div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;    short4 i_u = convert_short4_rtz(f_u) + (short4)(128);</div><div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;    short4 i_v = convert_short4_rtz(f_v) + (short4)(128);</div><div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;</div><div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;    uchar4 luma_0 = convert_uchar4(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short4)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_y, (short4)(255))));</div><div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;    vstore4(luma_0, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;</div><div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;    uchar4 cb_0 = convert_uchar4(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short4)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_u, (short4)(255))));</div><div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;    uchar4 cr_0 = convert_uchar4(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short4)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_v, (short4)(255))));</div><div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;    vstore4(cb_0, 0, out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;    vstore4(cr_0, 0, out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aabcf39e3917f842dbc5fbb0d802f24d5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">arm_compute::test::fixed_point_arithmetic::detail::min</a></div><div class="ttdeci">fixed_point&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">FixedPoint.h:897</a></div></div>
<div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">FixedPoint.h:902</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a18ef3b2b70de9af3e4386b2a07f2cd36"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void RGBA8888_to_IYUV_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>rgba_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a RGBA image to IYUV using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 2), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_input_step_x</td><td>rgba_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_input_step_y</td><td>rgba_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">u_output_ptr</td><td>Pointer to the destination U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_x</td><td>Stride of the destination U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_x</td><td>u_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_y</td><td>Stride of the destination image U channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_y</td><td>u_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination U channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">v_output_ptr</td><td>Pointer to the destination V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_x</td><td>Stride of the destination V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_x</td><td>v_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_y</td><td>Stride of the destination V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_y</td><td>v_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination V channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00786">786</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160;{</div><div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;    <span class="comment">// handle 4 pixels every time, two lines, each line for 2 pixels</span></div><div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_rgb = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(rgba_input);</div><div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_u  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_output);</div><div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_v  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_output);</div><div class="line"><a name="l00797"></a><span class="lineno">  797</span>&#160;</div><div class="line"><a name="l00798"></a><span class="lineno">  798</span>&#160;    <span class="comment">// Read 2 pixel of the first line</span></div><div class="line"><a name="l00799"></a><span class="lineno">  799</span>&#160;    uchar8 rgb_0 = vload8(0, in_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00800"></a><span class="lineno">  800</span>&#160;    uchar2 r_0   = (uchar2)(rgb_0.s0, rgb_0.s4);</div><div class="line"><a name="l00801"></a><span class="lineno">  801</span>&#160;    uchar2 g_0   = (uchar2)(rgb_0.s1, rgb_0.s5);</div><div class="line"><a name="l00802"></a><span class="lineno">  802</span>&#160;    uchar2 b_0   = (uchar2)(rgb_0.s2, rgb_0.s6);</div><div class="line"><a name="l00803"></a><span class="lineno">  803</span>&#160;</div><div class="line"><a name="l00804"></a><span class="lineno">  804</span>&#160;    float2 f_y = (float2)(0.0000f) + (float2)(0.2126f) * convert_float2(r_0) + (float2)(0.7152f) * convert_float2(g_0) + (float2)(0.0722f) * convert_float2(b_0);</div><div class="line"><a name="l00805"></a><span class="lineno">  805</span>&#160;    float2 f_u = (float2)(0.0000f) - (float2)(0.1146f) * convert_float2(r_0) - (float2)(0.3854f) * convert_float2(g_0) + (float2)(0.5000f) * convert_float2(b_0);</div><div class="line"><a name="l00806"></a><span class="lineno">  806</span>&#160;    float2 f_v = (float2)(0.0000f) + (float2)(0.5000f) * convert_float2(r_0) - (float2)(0.4542f) * convert_float2(g_0) - (float2)(0.0458f) * convert_float2(b_0);</div><div class="line"><a name="l00807"></a><span class="lineno">  807</span>&#160;</div><div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;    short2 i_y = convert_short2_rtz(f_y);</div><div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160;    short2 i_u = convert_short2_rtz(f_u) + (short2)(128);</div><div class="line"><a name="l00810"></a><span class="lineno">  810</span>&#160;    short2 i_v = convert_short2_rtz(f_v) + (short2)(128);</div><div class="line"><a name="l00811"></a><span class="lineno">  811</span>&#160;</div><div class="line"><a name="l00812"></a><span class="lineno">  812</span>&#160;    uchar2 luma_0 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_y, (short2)(255))));</div><div class="line"><a name="l00813"></a><span class="lineno">  813</span>&#160;    vstore2(luma_0, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00814"></a><span class="lineno">  814</span>&#160;</div><div class="line"><a name="l00815"></a><span class="lineno">  815</span>&#160;    uchar2 cb_0 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_u, (short2)(255))));</div><div class="line"><a name="l00816"></a><span class="lineno">  816</span>&#160;    uchar2 cr_0 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_v, (short2)(255))));</div><div class="line"><a name="l00817"></a><span class="lineno">  817</span>&#160;</div><div class="line"><a name="l00818"></a><span class="lineno">  818</span>&#160;    <span class="comment">// Read 2 pixel of the second line</span></div><div class="line"><a name="l00819"></a><span class="lineno">  819</span>&#160;    uchar8 rgb_1 = vload8(0, in_rgb.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + rgba_input_stride_y);</div><div class="line"><a name="l00820"></a><span class="lineno">  820</span>&#160;    uchar2 r_1   = (uchar2)(rgb_1.s0, rgb_1.s4);</div><div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;    uchar2 g_1   = (uchar2)(rgb_1.s1, rgb_1.s5);</div><div class="line"><a name="l00822"></a><span class="lineno">  822</span>&#160;    uchar2 b_1   = (uchar2)(rgb_1.s2, rgb_1.s6);</div><div class="line"><a name="l00823"></a><span class="lineno">  823</span>&#160;</div><div class="line"><a name="l00824"></a><span class="lineno">  824</span>&#160;    f_y = (float2)(0.0000f) + (float2)(0.2126f) * convert_float2(r_1) + (float2)(0.7152f) * convert_float2(g_1) + (float2)(0.0722f) * convert_float2(b_1);</div><div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160;    f_u = (float2)(0.0000f) - (float2)(0.1146f) * convert_float2(r_1) - (float2)(0.3854f) * convert_float2(g_1) + (float2)(0.5000f) * convert_float2(b_1);</div><div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;    f_v = (float2)(0.0000f) + (float2)(0.5000f) * convert_float2(r_1) - (float2)(0.4542f) * convert_float2(g_1) - (float2)(0.0458f) * convert_float2(b_1);</div><div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160;</div><div class="line"><a name="l00828"></a><span class="lineno">  828</span>&#160;    i_y = convert_short2_rtz(f_y);</div><div class="line"><a name="l00829"></a><span class="lineno">  829</span>&#160;    i_u = convert_short2_rtz(f_u) + (short2)(128);</div><div class="line"><a name="l00830"></a><span class="lineno">  830</span>&#160;    i_v = convert_short2_rtz(f_v) + (short2)(128);</div><div class="line"><a name="l00831"></a><span class="lineno">  831</span>&#160;</div><div class="line"><a name="l00832"></a><span class="lineno">  832</span>&#160;    uchar2 luma_1 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_y, (short2)(255))));</div><div class="line"><a name="l00833"></a><span class="lineno">  833</span>&#160;    vstore2(luma_1, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_output_stride_y);</div><div class="line"><a name="l00834"></a><span class="lineno">  834</span>&#160;</div><div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;    uchar2 cb_1 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_u, (short2)(255))));</div><div class="line"><a name="l00836"></a><span class="lineno">  836</span>&#160;    uchar2 cr_1 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_v, (short2)(255))));</div><div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;    uchar2 cbcr = (uchar2)(((cb_0.s0 + cb_0.s1 + cb_1.s0 + cb_1.s1) / 4),</div><div class="line"><a name="l00838"></a><span class="lineno">  838</span>&#160;                           ((cr_0.s0 + cr_0.s1 + cr_1.s0 + cr_1.s1) / 4));</div><div class="line"><a name="l00839"></a><span class="lineno">  839</span>&#160;    *out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> = cbcr.x;</div><div class="line"><a name="l00840"></a><span class="lineno">  840</span>&#160;    *out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> = cbcr.y;</div><div class="line"><a name="l00841"></a><span class="lineno">  841</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aabcf39e3917f842dbc5fbb0d802f24d5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">arm_compute::test::fixed_point_arithmetic::detail::min</a></div><div class="ttdeci">fixed_point&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">FixedPoint.h:897</a></div></div>
<div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">FixedPoint.h:902</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9ef9b466943c743b2a0f2865a70f741a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void RGBA8888_to_NV12_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uv_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a RGBA image to NV12 using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 2), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_y</td><td>input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">uv_output_ptr</td><td>Pointer to the destination uv channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_stride_x</td><td>Stride of the destination uv channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_step_x</td><td>uv_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_stride_y</td><td>Stride of the destination image uv channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_step_y</td><td>uv_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image uv channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00702">702</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;{</div><div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in     = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(input);</div><div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l00709"></a><span class="lineno">  709</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_uv = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uv_output);</div><div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;</div><div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;    <span class="comment">// Read 2 pixel of the first line</span></div><div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;    uchar8 rgb_0 = vload8(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;    uchar2 r_0   = (uchar2)(rgb_0.s0, rgb_0.s4);</div><div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;    uchar2 g_0   = (uchar2)(rgb_0.s1, rgb_0.s5);</div><div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;    uchar2 b_0   = (uchar2)(rgb_0.s2, rgb_0.s6);</div><div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;</div><div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;    float2 f_y = (float2)(0.0000f) + (float2)(0.2126f) * convert_float2(r_0) + (float2)(0.7152f) * convert_float2(g_0) + (float2)(0.0722f) * convert_float2(b_0);</div><div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;    float2 f_u = (float2)(0.0000f) - (float2)(0.1146f) * convert_float2(r_0) - (float2)(0.3854f) * convert_float2(g_0) + (float2)(0.5000f) * convert_float2(b_0);</div><div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;    float2 f_v = (float2)(0.0000f) + (float2)(0.5000f) * convert_float2(r_0) - (float2)(0.4542f) * convert_float2(g_0) - (float2)(0.0458f) * convert_float2(b_0);</div><div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;</div><div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;    short2 i_y = convert_short2_rtz(f_y);</div><div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;    short2 i_u = convert_short2_rtz(f_u) + (short2)(128);</div><div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;    short2 i_v = convert_short2_rtz(f_v) + (short2)(128);</div><div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;</div><div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;    uchar2 luma_0 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_y, (short2)(255))));</div><div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;    vstore2(luma_0, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;</div><div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;    uchar2 cb_0 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_u, (short2)(255))));</div><div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;    uchar2 cr_0 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_v, (short2)(255))));</div><div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;</div><div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;    <span class="comment">// Read 2 pixel of the second line</span></div><div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;    uchar8 rgb_1 = vload8(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + input_stride_y);</div><div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;    uchar2 r_1   = (uchar2)(rgb_1.s0, rgb_1.s4);</div><div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;    uchar2 g_1   = (uchar2)(rgb_1.s1, rgb_1.s5);</div><div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;    uchar2 b_1   = (uchar2)(rgb_1.s2, rgb_1.s6);</div><div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;</div><div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;    f_y = (float2)(0.0000f) + (float2)(0.2126f) * convert_float2(r_1) + (float2)(0.7152f) * convert_float2(g_1) + (float2)(0.0722f) * convert_float2(b_1);</div><div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;    f_u = (float2)(0.0000f) - (float2)(0.1146f) * convert_float2(r_1) - (float2)(0.3854f) * convert_float2(g_1) + (float2)(0.5000f) * convert_float2(b_1);</div><div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;    f_v = (float2)(0.0000f) + (float2)(0.5000f) * convert_float2(r_1) - (float2)(0.4542f) * convert_float2(g_1) - (float2)(0.0458f) * convert_float2(b_1);</div><div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;</div><div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160;    i_y = convert_short2_rtz(f_y);</div><div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;    i_u = convert_short2_rtz(f_u) + (short2)(128);</div><div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;    i_v = convert_short2_rtz(f_v) + (short2)(128);</div><div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;</div><div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;    uchar2 luma_1 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_y, (short2)(255))));</div><div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;    vstore2(luma_1, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_output_stride_y);</div><div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;</div><div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;    uchar2 cb_1 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_u, (short2)(255))));</div><div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;    uchar2 cr_1 = convert_uchar2(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short2)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_v, (short2)(255))));</div><div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;    uchar2 cbcr = (uchar2)(((cb_0.s0 + cb_0.s1 + cb_1.s0 + cb_1.s1) / 4),</div><div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;                           ((cr_0.s0 + cr_0.s1 + cr_1.s0 + cr_1.s1) / 4));</div><div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;    vstore2(cbcr, 0, out_uv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aabcf39e3917f842dbc5fbb0d802f24d5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">arm_compute::test::fixed_point_arithmetic::detail::min</a></div><div class="ttdeci">fixed_point&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">FixedPoint.h:897</a></div></div>
<div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">FixedPoint.h:902</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae424d47188a7fffd83a3a9d0c0e1ce6e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void RGBA8888_to_RGB888_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an RGB888 image to RGBX8888. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 16), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_y</td><td>input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_step_x</td><td>output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_step_y</td><td>output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00085">85</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;{</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(input);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(output);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="comment">// handle 16 pixels every time</span></div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    uchar16 rgba_0 = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    uchar16 rgba_1 = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 16);</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    uchar16 rgba_2 = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 32);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    uchar16 rgba_3 = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 48);</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    uchar16 rgb_0 = (uchar16)(rgba_0.s01245689, rgba_0.sacde, rgba_1.s0124);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    uchar16 rgb_1 = (uchar16)(rgba_1.s5689acde, rgba_2.s01245689);</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    uchar16 rgb_2 = (uchar16)(rgba_2.sacde, rgba_3.s01245689, rgba_3.sacde);</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    vstore16(rgb_0, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    vstore16(rgb_1, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 16);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    vstore16(rgb_2, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 32);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aee9a7e06c86387d2a46aad341fa940d0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void RGBA8888_to_YUV444_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>rgba_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>rgba_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a RGBA image to YUV444 using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 4), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_input_step_y</td><td>rgb_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rgba_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">u_output_ptr</td><td>Pointer to the destination U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_x</td><td>Stride of the destination U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_x</td><td>u_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_y</td><td>Stride of the destination image U channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_y</td><td>u_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination U channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">v_output_ptr</td><td>Pointer to the destination V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_x</td><td>Stride of the destination V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_x</td><td>v_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_y</td><td>Stride of the destination image V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_y</td><td>v_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination V channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00642">642</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;{</div><div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;    <span class="comment">// handle 4 pixels every time</span></div><div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_rgba = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(rgba_input);</div><div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_u   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_output);</div><div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_v   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_output);</div><div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;</div><div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160;    <span class="comment">// Read 4 pixel</span></div><div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;    uchar16 rgb_0 = vload16(0, in_rgba.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;    uchar4  r_0   = (uchar4)(rgb_0.s0, rgb_0.s4, rgb_0.s8, rgb_0.sc);</div><div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;    uchar4  g_0   = (uchar4)(rgb_0.s1, rgb_0.s5, rgb_0.s9, rgb_0.sd);</div><div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;    uchar4  b_0   = (uchar4)(rgb_0.s2, rgb_0.s6, rgb_0.sa, rgb_0.se);</div><div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;</div><div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;    float4 f_y = (float4)(0.0000f) + (float4)(0.2126f) * convert_float4(r_0) + (float4)(0.7152f) * convert_float4(g_0) + (float4)(0.0722f) * convert_float4(b_0);</div><div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;    float4 f_u = (float4)(0.0000f) - (float4)(0.1146f) * convert_float4(r_0) - (float4)(0.3854f) * convert_float4(g_0) + (float4)(0.5000f) * convert_float4(b_0);</div><div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;    float4 f_v = (float4)(0.0000f) + (float4)(0.5000f) * convert_float4(r_0) - (float4)(0.4542f) * convert_float4(g_0) - (float4)(0.0458f) * convert_float4(b_0);</div><div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;</div><div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;    short4 i_y = convert_short4(f_y);</div><div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;    short4 i_u = convert_short4(f_u) + (short4)(128);</div><div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;    short4 i_v = convert_short4(f_v) + (short4)(128);</div><div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;</div><div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;    uchar4 luma_0 = convert_uchar4_sat(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short4)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_y, (short4)(255))));</div><div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;    vstore4(luma_0, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;</div><div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;    uchar4 cb_0 = convert_uchar4_sat(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short4)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_u, (short4)(255))));</div><div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;    uchar4 cr_0 = convert_uchar4_sat(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>((short4)(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(i_v, (short4)(255))));</div><div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;    vstore4(cb_0, 0, out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;    vstore4(cr_0, 0, out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aabcf39e3917f842dbc5fbb0d802f24d5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">arm_compute::test::fixed_point_arithmetic::detail::min</a></div><div class="ttdeci">fixed_point&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">FixedPoint.h:897</a></div></div>
<div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">FixedPoint.h:902</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8946fa606d523038e103e6b4ceb42e56"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void UYVY422_to_IYUV_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uyvy_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uyvy_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uyvy_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uyvy_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uyvy_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uyvy_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a UYVY image to IYUV using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 8), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">uyvy_input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uyvy_input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uyvy_input_step_x</td><td>uyvy_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uyvy_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uyvy_input_step_y</td><td>uyvy_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uyvy_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">u_output_ptr</td><td>Pointer to the destination U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_x</td><td>Stride of the destination U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_x</td><td>u_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_y</td><td>Stride of the destination image U channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_y</td><td>u_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination U channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">v_output_ptr</td><td>Pointer to the destination V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_x</td><td>Stride of the destination V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_x</td><td>v_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_y</td><td>Stride of the destination V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_y</td><td>v_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination V channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l01341">1341</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l01346"></a><span class="lineno"> 1346</span>&#160;{</div><div class="line"><a name="l01347"></a><span class="lineno"> 1347</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_uyvy = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uyvy_input);</div><div class="line"><a name="l01348"></a><span class="lineno"> 1348</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l01349"></a><span class="lineno"> 1349</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_u   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_output);</div><div class="line"><a name="l01350"></a><span class="lineno"> 1350</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_v   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_output);</div><div class="line"><a name="l01351"></a><span class="lineno"> 1351</span>&#160;</div><div class="line"><a name="l01352"></a><span class="lineno"> 1352</span>&#160;    <span class="comment">// handle 16 pixels every time, each line 8 pixels</span></div><div class="line"><a name="l01353"></a><span class="lineno"> 1353</span>&#160;    uchar16 uyvy = vload16(0, in_uyvy.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01354"></a><span class="lineno"> 1354</span>&#160;    uchar8  luma = (uchar8)(uyvy.s1, uyvy.s3, uyvy.s5, uyvy.s7, uyvy.s9, uyvy.sb, uyvy.sd, uyvy.sf);</div><div class="line"><a name="l01355"></a><span class="lineno"> 1355</span>&#160;    ushort4 cb_0 = (ushort4)(uyvy.s0, uyvy.s4, uyvy.s8, uyvy.sc);</div><div class="line"><a name="l01356"></a><span class="lineno"> 1356</span>&#160;    ushort4 cr_0 = (ushort4)(uyvy.s2, uyvy.s6, uyvy.sa, uyvy.se);</div><div class="line"><a name="l01357"></a><span class="lineno"> 1357</span>&#160;    vstore8(luma, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01358"></a><span class="lineno"> 1358</span>&#160;</div><div class="line"><a name="l01359"></a><span class="lineno"> 1359</span>&#160;    uyvy         = vload16(0, in_uyvy.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + uyvy_input_stride_y);</div><div class="line"><a name="l01360"></a><span class="lineno"> 1360</span>&#160;    luma         = (uchar8)(uyvy.s1, uyvy.s3, uyvy.s5, uyvy.s7, uyvy.s9, uyvy.sb, uyvy.sd, uyvy.sf);</div><div class="line"><a name="l01361"></a><span class="lineno"> 1361</span>&#160;    ushort4 cb_1 = (ushort4)(uyvy.s0, uyvy.s4, uyvy.s8, uyvy.sc);</div><div class="line"><a name="l01362"></a><span class="lineno"> 1362</span>&#160;    ushort4 cr_1 = (ushort4)(uyvy.s2, uyvy.s6, uyvy.sa, uyvy.se);</div><div class="line"><a name="l01363"></a><span class="lineno"> 1363</span>&#160;    vstore8(luma, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_output_stride_y);</div><div class="line"><a name="l01364"></a><span class="lineno"> 1364</span>&#160;</div><div class="line"><a name="l01365"></a><span class="lineno"> 1365</span>&#160;    uchar4 cb = convert_uchar4((cb_0 + cb_1) / (ushort4)(2));</div><div class="line"><a name="l01366"></a><span class="lineno"> 1366</span>&#160;    uchar4 cr = convert_uchar4((cr_0 + cr_1) / (ushort4)(2));</div><div class="line"><a name="l01367"></a><span class="lineno"> 1367</span>&#160;    vstore4(cb, 0, out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01368"></a><span class="lineno"> 1368</span>&#160;    vstore4(cr, 0, out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01369"></a><span class="lineno"> 1369</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a966fe2be85946bbbe2ecad5ad1100d1f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void UYVY422_to_NV12_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>input_uyvy_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_uyvy_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_uyvy_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_uyvy_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_uyvy_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_uyvy_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uv_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a UYVY image to NV12 using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 4), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input_uyvy_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_uyvy_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_uyvy_step_x</td><td>input_uyvy_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_uyvy_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_uyvy_step_y</td><td>input_uyvy_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_uyvy_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_step_x</td><td>luma_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_step_y</td><td>luma_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">uv_ptr</td><td>Pointer to the destination uv channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_stride_x</td><td>Stride of the destination uv channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_step_x</td><td>uv_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_step_y</td><td>uv_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image uv channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l01803">1803</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l01807"></a><span class="lineno"> 1807</span>&#160;{</div><div class="line"><a name="l01808"></a><span class="lineno"> 1808</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in     = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(input_uyvy);</div><div class="line"><a name="l01809"></a><span class="lineno"> 1809</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma);</div><div class="line"><a name="l01810"></a><span class="lineno"> 1810</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_uv = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uv);</div><div class="line"><a name="l01811"></a><span class="lineno"> 1811</span>&#160;</div><div class="line"><a name="l01812"></a><span class="lineno"> 1812</span>&#160;    <span class="comment">// handle 16 pixels every time, each line 8 pixels</span></div><div class="line"><a name="l01813"></a><span class="lineno"> 1813</span>&#160;    <span class="keyword">const</span> uchar16 uyvy_t = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01814"></a><span class="lineno"> 1814</span>&#160;    vstore8(uyvy_t.s13579bdf, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01815"></a><span class="lineno"> 1815</span>&#160;</div><div class="line"><a name="l01816"></a><span class="lineno"> 1816</span>&#160;    <span class="keyword">const</span> uchar16 uyvy_b = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + input_uyvy_stride_y);</div><div class="line"><a name="l01817"></a><span class="lineno"> 1817</span>&#160;    vstore8(uyvy_b.s13579bdf, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_stride_y);</div><div class="line"><a name="l01818"></a><span class="lineno"> 1818</span>&#160;</div><div class="line"><a name="l01819"></a><span class="lineno"> 1819</span>&#160;    <span class="keyword">const</span> ushort8 cbcr_t = (ushort8)(uyvy_t.s0, uyvy_t.s2, uyvy_t.s4, uyvy_t.s6, uyvy_t.s8, uyvy_t.sa, uyvy_t.sc, uyvy_t.se);</div><div class="line"><a name="l01820"></a><span class="lineno"> 1820</span>&#160;    <span class="keyword">const</span> ushort8 cbcr_b = (ushort8)(uyvy_b.s0, uyvy_b.s2, uyvy_b.s4, uyvy_b.s6, uyvy_b.s8, uyvy_b.sa, uyvy_b.sc, uyvy_b.se);</div><div class="line"><a name="l01821"></a><span class="lineno"> 1821</span>&#160;    <span class="keyword">const</span> uchar8  cbcr   = convert_uchar8((cbcr_t + cbcr_b) / (ushort8)(2));</div><div class="line"><a name="l01822"></a><span class="lineno"> 1822</span>&#160;    vstore8(cbcr, 0, out_uv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01823"></a><span class="lineno"> 1823</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a0b20f3b21bfb3e5ef177eb946e3c905f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void UYVY422_to_RGB888_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a UYVY422 image to RGB888 using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 8), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_y</td><td>input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_step_x</td><td>output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_step_y</td><td>output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00124">124</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;{</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(input);</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(output);</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="comment">// handle 8 pixels every time</span></div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    uchar16 uyvy = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    uchar8 luma = (uchar8)(uyvy.s1, uyvy.s3, uyvy.s5, uyvy.s7, uyvy.s9, uyvy.sb, uyvy.sd, uyvy.sf);</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    char8  cb   = (char8)(uyvy.s0, uyvy.s0, uyvy.s4, uyvy.s4, uyvy.s8, uyvy.s8, uyvy.sc, uyvy.sc) - (char8)(128);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    char8  cr   = (char8)(uyvy.s2, uyvy.s2, uyvy.s6, uyvy.s6, uyvy.sa, uyvy.sa, uyvy.se, uyvy.se) - (char8)(128);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    float8 f_r = convert_float8(luma) + (float8)(0.0000f) * convert_float8(cb) + (float8)(1.5748f) * convert_float8(cr);</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    float8 f_g = convert_float8(luma) - (float8)(0.1873f) * convert_float8(cb) - (float8)(0.4681f) * convert_float8(cr);</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    float8 f_b = convert_float8(luma) + (float8)(1.8556f) * convert_float8(cb) + (float8)(0.0000f) * convert_float8(cr);</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    uchar8 r_0 = convert_uchar8_rtz(f_r);</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    uchar8 g_0 = convert_uchar8_rtz(f_g);</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    uchar8 b_0 = convert_uchar8_rtz(f_b);</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    uchar16 rgb_0 = (uchar16)(r_0.s0, g_0.s0, b_0.s0, r_0.s1, g_0.s1, b_0.s1, r_0.s2, g_0.s2, b_0.s2,</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;                              r_0.s3, g_0.s3, b_0.s3, r_0.s4, g_0.s4, b_0.s4, r_0.s5);</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    uchar8 rgb_1 = (uchar8)(g_0.s5, b_0.s5, r_0.s6, g_0.s6, b_0.s6, r_0.s7, g_0.s7, b_0.s7);</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    vstore16(rgb_0, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    vstore8(rgb_1, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 16);</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a22e98db2ca5538961967bdbaa19754b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void UYVY422_to_RGBA8888_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a UYVY422 image to RGBX8888 using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 8), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_y</td><td>input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_step_x</td><td>output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_step_y</td><td>output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00172">172</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;{</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(input);</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(output);</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <span class="comment">// handle 8 pixels every time</span></div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    uchar16 uyvy = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    uchar8 luma = (uchar8)(uyvy.s1, uyvy.s3, uyvy.s5, uyvy.s7, uyvy.s9, uyvy.sb, uyvy.sd, uyvy.sf);</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    char8  cb   = (char8)(uyvy.s0, uyvy.s0, uyvy.s4, uyvy.s4, uyvy.s8, uyvy.s8, uyvy.sc, uyvy.sc) - (char8)(128);</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    char8  cr   = (char8)(uyvy.s2, uyvy.s2, uyvy.s6, uyvy.s6, uyvy.sa, uyvy.sa, uyvy.se, uyvy.se) - (char8)(128);</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    float8 f_r = convert_float8(luma) + (float8)(0.0000f) * convert_float8(cb) + (float8)(1.5748f) * convert_float8(cr);</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    float8 f_g = convert_float8(luma) - (float8)(0.1873f) * convert_float8(cb) - (float8)(0.4681f) * convert_float8(cr);</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    float8 f_b = convert_float8(luma) + (float8)(1.8556f) * convert_float8(cb) + (float8)(0.0000f) * convert_float8(cr);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    uchar8 r_0 = convert_uchar8_rtz(f_r);</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    uchar8 g_0 = convert_uchar8_rtz(f_g);</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    uchar8 b_0 = convert_uchar8_rtz(f_b);</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    uchar16 rgba_0 = (uchar16)(r_0.s0, g_0.s0, b_0.s0, 255, r_0.s1, g_0.s1, b_0.s1, 255,</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;                               r_0.s2, g_0.s2, b_0.s2, 255, r_0.s3, g_0.s3, b_0.s3, 255);</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    uchar16 rgba_1 = (uchar16)(r_0.s4, g_0.s4, b_0.s4, 255, r_0.s5, g_0.s5, b_0.s5, 255,</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;                               r_0.s6, g_0.s6, b_0.s6, 255, r_0.s7, g_0.s7, b_0.s7, 255);</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    vstore16(rgba_0, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    vstore16(rgba_1, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 16);</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3f241a3b4a3fbd337c6fe03cd4e61877"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void YUYV422_to_IYUV_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>yuyv_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>yuyv_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>yuyv_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>yuyv_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>yuyv_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>yuyv_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>u_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>u_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>v_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>v_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a YUYV image to IYUV using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 8), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">yuyv_input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">yuyv_input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">yuyv_input_step_x</td><td>yuyv_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">yuyv_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">yuyv_input_step_y</td><td>yuyv_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">yuyv_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">u_output_ptr</td><td>Pointer to the destination U channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_x</td><td>Stride of the destination U channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_x</td><td>u_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_stride_y</td><td>Stride of the destination image U channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_step_y</td><td>u_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">u_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination U channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">v_output_ptr</td><td>Pointer to the destination V channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_x</td><td>Stride of the destination V channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_x</td><td>v_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_stride_y</td><td>Stride of the destination V channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_step_y</td><td>v_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination V channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l01402">1402</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l01407"></a><span class="lineno"> 1407</span>&#160;{</div><div class="line"><a name="l01408"></a><span class="lineno"> 1408</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_yuyv = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(yuyv_input);</div><div class="line"><a name="l01409"></a><span class="lineno"> 1409</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l01410"></a><span class="lineno"> 1410</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_u   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(u_output);</div><div class="line"><a name="l01411"></a><span class="lineno"> 1411</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_v   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(v_output);</div><div class="line"><a name="l01412"></a><span class="lineno"> 1412</span>&#160;</div><div class="line"><a name="l01413"></a><span class="lineno"> 1413</span>&#160;    <span class="comment">// handle 16 pixels every time, each line 8 pixels</span></div><div class="line"><a name="l01414"></a><span class="lineno"> 1414</span>&#160;    uchar16 yuyv = vload16(0, in_yuyv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01415"></a><span class="lineno"> 1415</span>&#160;    uchar8  luma = (uchar8)(yuyv.s0, yuyv.s2, yuyv.s4, yuyv.s6, yuyv.s8, yuyv.sa, yuyv.sc, yuyv.se);</div><div class="line"><a name="l01416"></a><span class="lineno"> 1416</span>&#160;    ushort4 cb_0 = (ushort4)(yuyv.s1, yuyv.s5, yuyv.s9, yuyv.sd);</div><div class="line"><a name="l01417"></a><span class="lineno"> 1417</span>&#160;    ushort4 cr_0 = (ushort4)(yuyv.s3, yuyv.s7, yuyv.sb, yuyv.sf);</div><div class="line"><a name="l01418"></a><span class="lineno"> 1418</span>&#160;    vstore8(luma, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01419"></a><span class="lineno"> 1419</span>&#160;</div><div class="line"><a name="l01420"></a><span class="lineno"> 1420</span>&#160;    yuyv         = vload16(0, in_yuyv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + yuyv_input_stride_y);</div><div class="line"><a name="l01421"></a><span class="lineno"> 1421</span>&#160;    luma         = (uchar8)(yuyv.s0, yuyv.s2, yuyv.s4, yuyv.s6, yuyv.s8, yuyv.sa, yuyv.sc, yuyv.se);</div><div class="line"><a name="l01422"></a><span class="lineno"> 1422</span>&#160;    ushort4 cb_1 = (ushort4)(yuyv.s1, yuyv.s5, yuyv.s9, yuyv.sd);</div><div class="line"><a name="l01423"></a><span class="lineno"> 1423</span>&#160;    ushort4 cr_1 = (ushort4)(yuyv.s3, yuyv.s7, yuyv.sb, yuyv.sf);</div><div class="line"><a name="l01424"></a><span class="lineno"> 1424</span>&#160;    vstore8(luma, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_output_stride_y);</div><div class="line"><a name="l01425"></a><span class="lineno"> 1425</span>&#160;</div><div class="line"><a name="l01426"></a><span class="lineno"> 1426</span>&#160;    uchar4 cb = convert_uchar4((cb_0 + cb_1) / (ushort4)(2));</div><div class="line"><a name="l01427"></a><span class="lineno"> 1427</span>&#160;    uchar4 cr = convert_uchar4((cr_0 + cr_1) / (ushort4)(2));</div><div class="line"><a name="l01428"></a><span class="lineno"> 1428</span>&#160;    vstore4(cb, 0, out_u.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01429"></a><span class="lineno"> 1429</span>&#160;    vstore4(cr, 0, out_v.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01430"></a><span class="lineno"> 1430</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aa4d458afddfb19f170cb27a9cc934069"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void YUYV422_to_NV12_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>yuyv_input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>yuyv_input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>yuyv_input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>yuyv_input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>yuyv_input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>yuyv_input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>luma_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>luma_output_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>uv_output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>uv_output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a YUYV image to NV12 using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 8), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">yuyv_input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">yuyv_input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">yuyv_input_step_x</td><td>yuyv_input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">yuyv_input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">yuyv_input_step_y</td><td>yuyv_input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">yuyv_input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">luma_output_ptr</td><td>Pointer to the destination luma channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_x</td><td>Stride of the destination luma channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_x</td><td>luma_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_stride_y</td><td>Stride of the destination image luma channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_step_y</td><td>luma_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">luma_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination luma channel </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">uv_output_ptr</td><td>Pointer to the destination UV channel. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_stride_x</td><td>Stride of the destination UV channel in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_step_x</td><td>uv_output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_stride_y</td><td>Stride of the destination image UV channel in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_step_y</td><td>uv_output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">uv_output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination UV channel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l01754">1754</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l01758"></a><span class="lineno"> 1758</span>&#160;{</div><div class="line"><a name="l01759"></a><span class="lineno"> 1759</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in_yuyv = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(yuyv_input);</div><div class="line"><a name="l01760"></a><span class="lineno"> 1760</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_y   = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(luma_output);</div><div class="line"><a name="l01761"></a><span class="lineno"> 1761</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out_uv  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(uv_output);</div><div class="line"><a name="l01762"></a><span class="lineno"> 1762</span>&#160;</div><div class="line"><a name="l01763"></a><span class="lineno"> 1763</span>&#160;    <span class="comment">// handle 16 pixels every time, each line 8 pixels</span></div><div class="line"><a name="l01764"></a><span class="lineno"> 1764</span>&#160;    uchar16 yuyv   = vload16(0, in_yuyv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01765"></a><span class="lineno"> 1765</span>&#160;    ushort8 cbcr_0 = (ushort8)(yuyv.s1, yuyv.s3, yuyv.s5, yuyv.s7, yuyv.s9, yuyv.sb, yuyv.sd, yuyv.sf);</div><div class="line"><a name="l01766"></a><span class="lineno"> 1766</span>&#160;    uchar8  luma   = (uchar8)(yuyv.s0, yuyv.s2, yuyv.s4, yuyv.s6, yuyv.s8, yuyv.sa, yuyv.sc, yuyv.se);</div><div class="line"><a name="l01767"></a><span class="lineno"> 1767</span>&#160;    vstore8(luma, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01768"></a><span class="lineno"> 1768</span>&#160;</div><div class="line"><a name="l01769"></a><span class="lineno"> 1769</span>&#160;    yuyv           = vload16(0, in_yuyv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + yuyv_input_stride_y);</div><div class="line"><a name="l01770"></a><span class="lineno"> 1770</span>&#160;    ushort8 cbcr_1 = (ushort8)(yuyv.s1, yuyv.s3, yuyv.s5, yuyv.s7, yuyv.s9, yuyv.sb, yuyv.sd, yuyv.sf);</div><div class="line"><a name="l01771"></a><span class="lineno"> 1771</span>&#160;    luma           = (uchar8)(yuyv.s0, yuyv.s2, yuyv.s4, yuyv.s6, yuyv.s8, yuyv.sa, yuyv.sc, yuyv.se);</div><div class="line"><a name="l01772"></a><span class="lineno"> 1772</span>&#160;    vstore8(luma, 0, out_y.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + luma_output_stride_y);</div><div class="line"><a name="l01773"></a><span class="lineno"> 1773</span>&#160;</div><div class="line"><a name="l01774"></a><span class="lineno"> 1774</span>&#160;    uchar8 cbcr = convert_uchar8((cbcr_0 + cbcr_1) / (ushort8)(2));</div><div class="line"><a name="l01775"></a><span class="lineno"> 1775</span>&#160;    vstore8(cbcr, 0, out_uv.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l01776"></a><span class="lineno"> 1776</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a694c56c3d1dd37a2773e650ab8e410b2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void YUYV422_to_RGB888_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a YUYV422 image to RGB888 using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 8), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_y</td><td>input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_step_x</td><td>output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_step_y</td><td>output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00221">221</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;{</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(input);</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(output);</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    <span class="comment">// handle 8 pixels every time</span></div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;    uchar16 uyvy = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    uchar8 luma = (uchar8)(uyvy.s0, uyvy.s2, uyvy.s4, uyvy.s6, uyvy.s8, uyvy.sa, uyvy.sc, uyvy.se);</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    char8  cb   = (char8)(uyvy.s1, uyvy.s1, uyvy.s5, uyvy.s5, uyvy.s9, uyvy.s9, uyvy.sd, uyvy.sd) - (char8)(128);</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    char8  cr   = (char8)(uyvy.s3, uyvy.s3, uyvy.s7, uyvy.s7, uyvy.sb, uyvy.sb, uyvy.sf, uyvy.sf) - (char8)(128);</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    float8 f_r = convert_float8(luma) + (float8)(0.0000f) * convert_float8(cb) + (float8)(1.5748f) * convert_float8(cr);</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    float8 f_g = convert_float8(luma) - (float8)(0.1873f) * convert_float8(cb) - (float8)(0.4681f) * convert_float8(cr);</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    float8 f_b = convert_float8(luma) + (float8)(1.8556f) * convert_float8(cb) + (float8)(0.0000f) * convert_float8(cr);</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    uchar8 r_0 = convert_uchar8_rtz(f_r);</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    uchar8 g_0 = convert_uchar8_rtz(f_g);</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    uchar8 b_0 = convert_uchar8_rtz(f_b);</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    uchar16 rgb_0 = (uchar16)(r_0.s0, g_0.s0, b_0.s0, r_0.s1, g_0.s1, b_0.s1, r_0.s2, g_0.s2, b_0.s2,</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;                              r_0.s3, g_0.s3, b_0.s3, r_0.s4, g_0.s4, b_0.s4, r_0.s5);</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    uchar8 rgb_1 = (uchar8)(g_0.s5, b_0.s5, r_0.s6, g_0.s6, b_0.s6, r_0.s7, g_0.s7, b_0.s7);</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;    vstore16(rgb_0, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;    vstore8(rgb_1, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 16);</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab0be9d15196e78ed50afdbfa93a11662"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void YUYV422_to_RGBA8888_bt709 </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>input_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>output_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>output_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a YUYV422 image to RGBX8888 using BT709 color space. </p>
<p>Global Workgroup Size [ DIV_CEIL(width, 8), height ] No offset.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_step_y</td><td>input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_step_x</td><td>output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_step_y</td><td>output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="color__convert_8cl_source.xhtml#l00269">269</a> of file <a class="el" href="color__convert_8cl_source.xhtml">color_convert.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>.</p>
<div class="fragment"><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;{</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> in  = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(input);</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(output);</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;    <span class="comment">// handle 8 pixels every time</span></div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    uchar16 uyvy = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;    uchar8 luma = (uchar8)(uyvy.s0, uyvy.s2, uyvy.s4, uyvy.s6, uyvy.s8, uyvy.sa, uyvy.sc, uyvy.se);</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    char8  cb   = (char8)(uyvy.s1, uyvy.s1, uyvy.s5, uyvy.s5, uyvy.s9, uyvy.s9, uyvy.sd, uyvy.sd) - (char8)(128);</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    char8  cr   = (char8)(uyvy.s3, uyvy.s3, uyvy.s7, uyvy.s7, uyvy.sb, uyvy.sb, uyvy.sf, uyvy.sf) - (char8)(128);</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    float8 f_r = convert_float8(luma) + (float8)(0.0000f) * convert_float8(cb) + (float8)(1.5748f) * convert_float8(cr);</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    float8 f_g = convert_float8(luma) - (float8)(0.1873f) * convert_float8(cb) - (float8)(0.4681f) * convert_float8(cr);</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    float8 f_b = convert_float8(luma) + (float8)(1.8556f) * convert_float8(cb) + (float8)(0.0000f) * convert_float8(cr);</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    uchar8 r_0 = convert_uchar8_rtz(f_r);</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    uchar8 g_0 = convert_uchar8_rtz(f_g);</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    uchar8 b_0 = convert_uchar8_rtz(f_b);</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    uchar16 rgba_0 = (uchar16)(r_0.s0, g_0.s0, b_0.s0, 255, r_0.s1, g_0.s1, b_0.s1, 255,</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;                               r_0.s2, g_0.s2, b_0.s2, 255, r_0.s3, g_0.s3, b_0.s3, 255);</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    uchar16 rgba_1 = (uchar16)(r_0.s4, g_0.s4, b_0.s4, 255, r_0.s5, g_0.s5, b_0.s5, 255,</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;                               r_0.s6, g_0.s6, b_0.s6, 255, r_0.s7, g_0.s7, b_0.s7, 255);</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;    vstore16(rgba_0, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;    vstore16(rgba_1, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 16);</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_aebb8dcc11953d78e620bbef0b9e2183.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_8c278f79c760e5c5fbd911f9870614c1.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_25885286e9dad4fa105b7b25a8031bbf.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="color__convert_8cl.xhtml">color_convert.cl</a></li>
    <li class="footer">Generated on Wed May 23 2018 11:36:38 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
